ArcherPoint Dynamics NAV Business Central Developer Digest - vol 319

ArcherPoint Dynamics NAV Business Central Developer Digest - vol 319

 

This edition of Developer Digest discusses setting up Azure SQL analytics and why you should stop using “With” statements in Business Central.

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 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.

Telemetry is Everything: Setting Up Azure SQL Analytics

Marije Brummel says you can’t have enough data when performance changes over time or when systems start behaving differently. He points out that Azure SQL gives us so much more to work with than on-premises solutions and walks you through how to connect Azure SQL Analytics to your Azure Monitor in Setting up Azure SQL Analytics (Preview) – Dynamics NAV.

Stop Using the “With” Statement in BC!

With the release of D365 Business Central 2020 Wave 2, explicit and implicit “with” statements will be deprecated, so best to stop using them now. Len B has a tip about this: “I’m assuming you all saw the note from Saurav about the ‘with’ statement going away in AL. The AL Compiler (version 6.x) has an option to auto correct this for you, but I couldn’t find it at first. Then I read that the ‘Enable Code Actions’ for the AL Compiler is turned off by default.


Figure 1 – Microsoft Dynamics Business Central statement warning that the “with” statement will be removed in a future release


Figure 2 –Microsoft Dynamics Business Central: Correcting “with” statement warnings

If you want to use the ‘quick fix’ light bulb to correct these warnings, you need to go to your VS Code settings (File/Preferences/Settings), search for Enable Code Actions, and turn on the AL: Enable Code Actions. Then you will be able to either use the light bulb in the PROBLEMS area at the bottom of VS Code or click on the yellow underline for the record variable used in a ‘with’ statement and use the light bulb to convert the with statement for you. Looks like you can only do one at a time even if you select more than one…bummer…

This takes care of an explicit ‘with’ statement, where you put in the ‘with Rec do’ statement yourself. This does not fix implicit ‘with’ statements, which is all your code on a table or page that does not have Rec. in front of it. There is an extension called ‘AL Code Actions’ that is supposed to take care of that if you have any AL0604 errors, but I haven’t figured that part out yet…but this is a start!”

Kyle did as Len suggested and: “After I turned that on, VSC is now kicking the crap out of my CPU a lot of the time.” 

Len agreed: “Yup, had the same issue, but it does work when it finally shows up!”

If you are interested in Dynamics NAV and Business Central development, be sure to see our collection of NAV/BC Development Blogs.

Read the “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