Dynamics NAV / Business Central Developer Digest - Vol 397
ArcherPoint’s Developer Digest focuses on Microsoft Dynamics 365 Business Central development and Dynamics NAV development. In Developer Digest Volume 397, you’ll read about how to inject lines in the invoicing process of a purchase order in Business Central, using system app module to communicate Azure functions, understanding monitoring field changes in MSD365 BC, and upcoming Business Central Office Hours.
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 the wealth of 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.
Injecting Lines in the Invoicing Process of a Purchase Order in BC
Hasse asks the team: “Does anyone have a working example of injecting one or more lines in the invoicing process of a Purchase Order? The lines should not appear on the Purchase Order in case it is not deleted.”
Chris shares his experience: “I have seen things like this done before (Adding a Freight G/L Line, etc.) in the much older C/AL versions when the functionality was more limited. A couple of things I would keep in mind:
- If you are adding lines, they should be done as part of the Release process as that is where taxes are calculated.
- If you add them on Release, they will show on the Purchase Order if the user does a manual release.
- Removing Posted lines from the Purchase Order is possible but is not be recommended. There would have to be a good reason to want to tackle this.
I haven’t seen this done AL, so I can’t verify that the required triggers exist (Although I would expect the Release functionality would have what you want).”
Tom adds: “I don’t have a working example, because the request is a little too vague to know exactly what it should do.
You’d need to subscribe to the Purch.-Post codeunit, definitely. If the lines were affecting the total amount of the order, you’d want to add them before it was released, and you’d probably have to reopen/re-release as a part of that. If they’re just comment lines that don’t change the price, you can add them to the posted purchase invoice; I believe there’s an event that goes off when that document gets written.”
Using a System App Module to Communicate with Azure Functions
Kennie Nybo Pontoppidan tweets: “In #msdyn365bc version 21.0, you can use a system app module to communicate with Azure functions. And of course, you get usage telemetry for it as well. KQL sample is already available here on GitHub.” He elaborates that this module makes it easier for AL developers to call whatever Azure function they want, including usage and error telemetry out-of-the-box, which goes beyond the Azure functions available that you may already be using to retrieve files from Azure containers.
Business Central Office Hours – Excel Layout and Reporting On Deck
Business Central Office Hours are happening, with Excel Layout and Reporting on Aug 23rd, Microsoft Doc Sharing for MS Dyn 365 BC on August 30, and Power Automate and Power Platform Integrations on September 6.
Monitoring Field Changes in Business Central
DvlprLife recently posted about monitoring field changes in MSD365 BC, warning that using Change Log or Field Monitor may impact performance. In the BC 2020 Wave 2 release, Monitored Field Worksheet was introduced and they show how to use this new worksheet. Check out the article for more details.
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.