Skip to content

ArcherPoint Dynamics NAV Developer Digest - vol 120Developer Dude

The NAV 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 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 experts and devotees around the world. We hope these insights will benefit you, too.

Retrieving Setup Tables in Dynamics NAV

Bill Warnke asks, “Anyone have any thoughts on retrieving setup tables like the code below? Is this considered an anti-pattern yet? The goal would be to avoid going to the SalesSetup table but with the 2013+ data caching why bother?”


IF NOT SalesSetupRetrieved THEN BEGIN


SalesSetupRetrieved := TRUE;


Kyle Hardin responds, “I’ve never bothered. I just make sure my GET isn't in a loop and is somewhere early in the code.

I've not run the numbers, but one might argue that the C/AL logic analysis is as expensive as a cached database fetch.”

Jon Long notes, “Good pattern. Used in OOP.”

Suresh Kulla shares an article titled “Read Once Initialization and Validation

Excel Print & Send from the NAV Item List

Kyle Hardin asks, “If I am on an Item list, and choose Print & Send, Microsoft Excel, does that call C/AL code I can get to, or is that built into the RTC and is untouchable? I have a customer request to fix the problem that the resulting spreadsheet is (mostly) un-editable. You can't delete rows or columns. It looks like the resulting spreadsheet is one of those fancy XML-embedded database spreadsheets like RapidStart uses.”

Bill Warnke notes that he believes the Print & Send to Excel function skips the style sheet functionality. Faithie Robertson suggests adding a "Create Excel Output" Boolean and using the Excel Buffer to output a usable excel spreadsheet. The ones that go through the client "print" function cannot be sorted due to all the merge fields. And you can easily search for uses of the Excel Buffer and find the code to get you started.

Design Pattern: Security – Sensitive Data Encapsulation

From the Dynamics NAV Team blog comes this blurb, Design Pattern: Security- Sensitive Data Encapsulation, on how to protect sensitive data that is scattered throughout various parts of Dynamics NAV, often times residing in the same tables as non-sensitive data. Included is a handy link to the NAV Design Patterns wiki site.

Want to be kept abreast of what's new in the Microsoft Dynamics NAV community and at ArcherPoint? Subscribe to our monthly newsletter, Better Business, by completing the form in our Resource Center.

If you are interested in NAV development, check out our collection of NAV Development Blogs.

Blog Tags: 
Read ArcherPoint's Blog Follow us on Twitter Follow us on Facebook Follow us on LinkedIn Link to our RSS feed Watch us on YouTube
Get Help Now