ArcherPoint Dynamics NAV Developer Digest - vol 237

ArcherPoint Dynamics NAV Developer Digest - vol 237

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.

NavContainerHelper Version 0.5.0.11

Freddy calls out some important changes in the Version 0.5.0.11 release of NAVContainerHelper:

  • .app instead of .fob
  • Functions for invoking APIs
  • AL files

As you are working with Business Central, you’ll want to be aware of these changes and some workarounds offered.

POP, IMAP, and SMTP Settings for Outlook.com

Adrian is “having an issue setting up the SMTP Mail for the approval process in the TEST database. When we click the Test Email Setup button, we get an error message that says ‘Unable to Connect to the remote server’. How can we troubleshoot the issue? Thanks!”

Joe Shields asks: “Are you sure that is the right SMTP server address and port? Are they using Office 365 for email?”

Matt T adds this link to the Microsoft Office support article for POP, IMAP, and SMTP settings for Outlook.com

How Many Indexes Are Too Many?

In his post in the series, Index Tuning Week: How Many Indexes Are Too Many?, Brent Ozar boils it down to this rule of thumb for performance tuners: “Aim for around 5 indexes per table, with around 5 columns (or less) each.”

If you’re looking for some fundamentals for performance tuning your database, check him out.

Enumeration Types: Declaring an Enum in AL

Bill Warnke says: “I experimented with the new extensible enums (instead of making an Option field) just to see what it can do.  
 
Quick takes:

  • It’s very close in functionality to the option value. Defined as a field on a table, it stores the value as an integer in SQL. It is order sensitive (you can’t reorder without changing data).
  • Instead of duplicating an option string from a table in a variable, or even another table, you can define the enum object type and “instantiate” it in a table or in a variable. Cool.
  • It still uses an ID for each value. There could be collisions. Not Cool. 

Edit: 
Oh, and of course one of the main reasons for enums is not having to do this anymore: 
Quote,Order,Invoice,Credit Memo,Blanket Order,Return Order,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,New Value”

Kyle agrees: “Still uses an ID for each value. There could be collisions. Not Cool.
 
Isn’t that a problem with enum types in any language? If you are storing it in a database, it either has to store an integer (ID) with some sort of mapping, or it must store the string itself?”

Bill replies: “Yeah. In this case, the ‘ID’ appears to only to be for uniqueness. The actual physical order it’s in gives it its numerical position on the database. Now I wonder how it’s going to handle installing an extension that extends an enum, uninstalling and then installing a different extension that extends the same enum. From the behavior I’ve seen, this means that the new extension will assume the integer values of the previously installed extension.  
 
It seems the top 3 methods of storing in an enum in a database (in no order of correctness) are:

  1. Use an integer
  2. Lookup table
  3. Just store the enum value

All of the opinions say option X is the best, and it’s not done like Y anymore. I was kind of hoping for option 2-3 hybrid.”

If you are interested in NAV 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