ArcherPoint Dynamics NAV Developer Digest - vol 264

ArcherPoint Dynamics NAV Developer Digest - vol 264

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

Developer Tip of the Day: AL Reporting

Kyle shares: “Developer Tip of the Day: In AL reporting, declare text constants as labels this way, and they show up in RDLC as Parameters, which means you do not have to add them into the dataset (Do not declare label variables; those have to be added to the dataset): 

labels { ReportCaption = ‘Title of My Report’; 

You can also have the data columns include their own caption, and that will also have those captions show up as parameters:

column(“VendorNo”; “Purchase Header”.”Buy-from Vendor No.”) { 

IncludeCaption = true; 

The Problem with Users Creating Extension Apps

Kyle says: “There are some user interface customizations that users can do that result in an extension app being created with AL Page Extensions inside it. While this sounds like a good thing, it is actually quite a pain for two reasons. One, that app is now dependent on the main app with all of our AL customizations, which means it gets in the way of deploying new code. Two, the little custom app itself isn’t very clever about the object numbers it chooses, and it doesn’t check to see if a page extension already exists for the base page. Conflicts frequently occur. Is there a way to block users from creating extension apps?” 

Bill W replies with this Waldo post: “Business Central Modern Client: Remove the Design Button. Instead of messing with settings, I would try just deny Insert on an extension table in SQL. Maybe this one: [NAV App Object Metadata]” 

Kyle exclaims: “Perfect! I’ll just shut that sucker off.”

Matt T adds: “Just to play the other side, is that what the customer wants? It shouldn’t just be about making our lives easier.”

Jon adds: “That’s now Personalizations and Profiles. I would figure out some other solution than preventing that functionality.”

Kyle explains: “If this were just a matter of removing the customer apps before I update the ArcherPoint app and then re-applying the customer apps, I could make that work with scripting. The problem is that the customer apps have conflicting page extensions in them. Either the object number has already been used by our code, or we wind up with more than one page extension on top of the same base page.”

Developer Tip of the Day: Search File Directory Contents 

Kyle helps with another tip: “Developer Tip of the Day: From PowerShell, you can search a directory file contents:  

 cd C:UsersKyle HardinOneDrive – ArcherPoint, IncgitCKSPackagingALPages 

 Select-String *.al -pattern FilterGroup 

 Pag126-Ext50122.al:9: FilterGroup(11); 

Pag126-Ext50122.al:11: FilterGroup(0); 

Pag128-Ext50124.al:9: FilterGroup(11); 

Pag128-Ext50124.al:11: FilterGroup(0); 

 

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