ArcherPoint Dynamics NAV Business Central Developer Digest - vol 305 Suzanne Scanlan Fri, 08/07/2020 - 05:25

ArcherPoint Dynamics NAV / Business Central Developer Digest - Vol 305

ArcherPoint Dynamics NAV and BC Developer Digest Blog

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.

Enum Extension in Dynamics 365 Business Central

Kyle says: “This. This is very, very cool. 

enumextension 50000 "ARC EnumExt50000.Enum272Extension" extends "Bank Payment Type" { value(50000; "BoA Check")     {         Caption = 'Bank of America Check';     } } 

I should clarify for those who have not bathed in the fires of AL development. In C/AL, let's say you wanted to add a new Bank Payment Type on the Bank Account record. You'd have to modify the base table object 270 and add your new Option type: 
  
" ", "Manual Check", "Computer Check", "Electronic Payment",,,,,,,,,,,,"BoA Check" 
  
And you just hope they never add enough base options to over-run your pile of commas.   
With Business Central, you are not allowed to modify base objects. OK, you can, but it is a really bad idea. 
  
Enums are a replacement for Options. And as of BC16, Microsoft has replaced lots of the major Option fields like Type on Sales Line with Enums. That means you can add new values without modifying the base table object. That is what an EnumExtension is used for.” 

How Software Excellence Fuels Business Performance

Matt T informs: “I found this article from McKinsey very interesting. It's titled "How Software Excellence Fuels Business Performance" and talks about how businesses are achieving the greatest returns from their developers. I've listed a few key points I found informative, but there are a lot more. I'd encourage everyone to give it a quick read if they have time.” 
  

  • The Developer Velocity Index pinpoints the most critical factors in achieving improved performance with regard to software development, as well as those that are not nearly as important as many executives and observers might believe.
  • Top-quartile DVI scores correlate with revenue growth that is four to five times that of bottom-quartile with 60% higher shareholder returns and 20% higher operating margins. They also score higher in customer satisfaction, brand perception, and talent management.
  • Best in class tools are the top contributor to business success, enabling greater productivity, visibility, and coordination, yet only 5% of executives recognized this link and ranked tools in their top three enablers. The disconnect is likely attributed to the fact that most leaders do not understand the day-to-day developer experience.
  • The ability to access relevant tools for each stage of the development lifecycle contributes to developer retention rates that are 47% higher for top-quartile companies. 

Using PowerShell to Find a String in a File in Subdirectories

Kyle shares: “Developer Tip of the Day: Using PowerShell to find a string in a file—but go into subdirectories:
  
I've discussed the PowerShell command, select-string, before. Here is the PowerShell documentation from Microsoft.

But what if you want it to go into subdirectories, too? I've been on an ap-nav-docker witch hunt for over an hour now, so I wanted to find a particular string, but I don't know the exact directory. The solution is to fetch the list of subdirectories first, and then pipe that set of directories into select-string:
  
Get-ChildItem ` 
-Path "C:\users\Kyle Hardin\*.ps1" ` 
-Recurse | ` 
Select-String ` 
-Pattern '15.0.36560.0-na' ` 
-CaseSensitive 
 
Bill W asks: “Ctrl + Shift + F doesn't work?” 

Kyle responds: “Add this to your set.env.local.ps1:  

[Environment]::SetEnvironmentVariable("imageName", "", "Process") 

Whatever way you're executing the PowerShell in the project is holding onto that environment variable.” Learn more about PowerShell and Visual Studio from Microsoft.

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.

Blog tags