Dynamics NAV / Business Central Developer Digest - Vol 384

Dynamics NAV / Business Central Developer Digest - Vol 384

ArcherPoint’s Developer Digest focuses on Microsoft Dynamics 365 Business Central development and Dynamics NAV development. In Developer Digest Volume 384, we discuss the Microsoft Build conference, acquiring source code for BC, and a Friday funny.

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.

Attend the Microsoft Build Conference 

Matt T shares: “A reminder about a conference we don’t usually think about. Microsoft Build is May 24th to the 26th. It is once again virtual. And it’s free. You won’t find a single thing about Business Central here. Check out the session archives from last year if you want to see the types of things they talk about and block off some time on your calendars. It is absolutely worth it.” 

Acquiring Source Code for Business Central 

Kyle asks: “What do you do to acquire source code for Business Central? I have two methods, and I can’t decide which is most ‘accurate.’ 

  1. When creating a Docker container, use the BCContainerHelper command, Create-AlProjectFolderFromBCContainer. You get workspaces defined for VSCode, but I’m not convinced this actually gets you everything available. 
  1. Download an on prem installation and use PowerShell to expand all the compressed source code zip archives.  

Method 1 is 320 MB. Method 2 is 2.12 GB and has a whole lot more subdirectories (and thus apps) than Method 1.” 

Matt T responds: “I don’t ever truly need the source code—just to take a peek from time to time—so I don’t use either of those. AZ AL Tools extension for VS Code. Just click your app file (symbols) and you get an old Object Designer style interface that you can open most objects from.” 

Kyle says: “I use it all the time—daily, even. Examples: 

  • Find All References (where is this function called from) 
  • Exact event publisher parameters 
  • Seeing what’s around that publisher call so I know I’m calling the correct publisher 
  • Reconciling what changed in between 19 and 20 and adjusting code accordingly (Beyond Compare rocks at this) 
  • Seeing what these new (grrr) interfaces do and how they work 
  • Borrowing code, code ideas, code designs 
  • Go To Definition  

Heinrich weighs in: “Good input. I also like to look at the code to see the context of events. Thanks for the idea of version comparison—also love Beyond Compare.” 

Kyle adds: “PurchasePost has been re-written for BC20 and divided off into its own app. The procedure PostVendorEntry changed: 

[EventSubscriber(ObjectType::Codeunit, Codeunit::”Purch.-Post”, ‘OnBeforePostVendorEntry’, ”, true, true)] 
[EventSubscriber(ObjectType::Codeunit, Codeunit::”Purch. Post Invoice Events”, ‘OnPostLedgerEntryOnBeforeGenJnlPostLine’, ”, true, true)] 

I never would have figured this out without access to the source code.” 

Tom H agrees: “I’m like Kyle. I use the source code all the time. Generally, I find that the AL Tools extension gives me what I need, and I don’t need all the code split into separate files; the extension gives me enough.” 

Michael, too: “I reference the AL source code files also. I use the parameter -includeAL when building the container. A folder is created under c:\ProgramData\BcContainerHelper that contains all the source code. I move this folder to my D drive.” 

Kyle continues: “-includeAL is the same thing as Create-AlProjectFolderFromBCContainer. Attached is a comparison. As you can see, there are many more apps included in the installation kit method.” 

Matt T responds: “If you all want, we can always automate something to pull this and just put it into source control. That way you don’t have to do anything.” 

Friday Funny – Finally Making Progress 

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
Last Name
Subscription Options
Your Privacy is Guaranteed