Dynamics NAV / Business Central Developer Digest - Vol 369

Dynamics NAV / Business Central Developer Digest - Vol 369

ArcherPoint's Developer Digest is a post that highlights on a weekly basis Microsoft Dynamics 365 Business Central development and Dynamics NAV development. In Developer Digest Volume 369, we discuss using Azure log analytics on older versions of NAV, upgrading codeunits, defining Business Central views in AL, and more.

The Dynamics NAV and Business Central community, including the ArcherPoint technical staff, is made up of developers, project managers, and consultants who are constantly communicating, with the common goal of  sharing helpful information with one another to help customers be more successful.

As they run into issues and questions, find the answers, and make new discoveries, they post them on blogs, forums, social media...so everyone can benefit. We in Marketing watch these interactions and never cease to be amazed by the creativity, dedication, and brainpower we’re so fortunate to have in this community—so we thought, wouldn’t it be great to share this great information with everyone who might not have the time to check out the multitude of resources out there?

So, the ArcherPoint Microsoft Dynamics NAV/BC Developer Digest was born. Each week, we present a collection of thoughts and findings from NAV/BC experts and devotees around the world. We hope these insights will benefit you, too.

Developer Tip Of The Day: Upgrade Codeunits 

If you'd like to see a log of upgrade codeunits that have been executed for a database, run table 9999. If your upgrade codeunit (or Microsoft's) is written properly, it will log itself using the Upgrade Tag codeunit, which ensures the upgrade doesn't try to run more than once. 

server/bc/?Table=9999 

Adding A Conditional Statement On A Data Exchange Definition

Leanne asks: “Has anyone done a conditional statement on a data exchange definition? We have an upgrade customer with a custom positive pay export. It has a code printing in the file depending on the Entry Type of the transaction (e.g., Voided = "370", Posted = "320"). I'm trying to replicate this using the base BC Positive Pay functionality with a data exchange definition. Thanks! 

Kyle responds: “Unless they introduced something new in BC19, the only way to do conditionals is with code. Copy codeunit 1704 to a new custom codeunit and implement the logic there.”

local procedure PreparePosPayDetail 

PosPayDetail."Account Number" := BankAccount."Bank Account No."; 
if DataExchangeEntryNo = CheckLedgerEntry."Data Exch. Voided Entry No." then begin 
// V for Void legend 
PosPayDetail."Record Type Code" := 'V'; 
PosPayDetail."Void Check Indicator" := '2'; 
end else begin
// O for Open legend  
PosPayDetail."Record Type Code" := 'O'; 
PosPayDetail."Void Check Indicator" := ''; 
end; 

a Conditional Statement On a Data Exchange Definition
Figure 1 - Conditional statement on a data exchange definition

Using Azure Log Analytics On Older Versions Of Dynamics NAV

Recently, people began asking about analyzing performance telemetry. In her blog, Marije Brummel explains that it is possible for older NAV versions with Azure Log Analytics and KQL. Read Using Azure Log Analytics on older Dynamics NAV versions to learn ho

Defining Business Central Views In AL

Did you know you can add views in AL? Erik Hougaard share how to give customers a much better list page experience (and fewer of them) utilizing AL. Watch How to Add Pizzaz to Your List Pages with View in AL and Business Central to learn all about it.

Trojan Warnings When Creating Containers

The latest Freddy’s blog points out a problem: “With the latest update to Windows 11 and defender, my computer is telling me that I have a Trojan Virus every time I create a container” when there is actually no virus. Read about your options for dealing with this in Trojan Warning when creating Containers

Creating Dynamic Factboxes

In a recent post, Alberto the Business Central Geek explains how to create a dynamic factbox depending on the line of the document the user is positioned in. Read Master Factboxes to learn more.

Interested in Dynamics NAV and/or Business Central development? Be sure to see our collection of NAV/BC Development Blogs.

Read "How To" blogs from ArcherPoint for practical advice on using Microsoft Dynamics NAV and Dynamics 365 Business Central.

Trending Posts

Stay Informed

Choose Your Preferences
First Name
*required
Last Name
*required
Email
*required
Subscription Options
Your Privacy is Guaranteed