Creating a Generic Dynamics NAV Lookup Table to Encourage Good Behavior

by | Feb 26, 2016 | Dynamics NAV

During initial design on a Dynamics NAV project, it is easy to make a decision between employing an Option field or a Code field validated by a dedicated table. We buy what tables we need and off to the races we go.

As a project matures and the table spread of middle age occurs it is not uncommon to deal with a support request that really calls for a validated field, but there aren’t any tables left in the license at that point and time is of the essence. This is when design crimes are committed with the best of intentions and fields may be made with long option strings or for options that are not as static as we would like to think.

Dynamics NAV Lookup Table Solution:

To avoid this situation, we may add a generic lookup table to our projects. In this way, the first table we ever use is always there to make a good choice at a later point in the project lifecycle. This is not an invitation to make a mess and end up with ridiculous quantities of data in a table. When a validation table needs more than Code and Description fields it probably does need a dedicated table. The other vital requirement is that the use of a generic lookup table is transparent to users.

Dynamics NAV Lookup Table Implementation:

Our generic table contains three fields:

  • The Code and Description fields are like those in any lookup table
  • The “Field Name” field is used to separate the data belonging to entirely different lookups.

Dynamics NAV Table Lookup

 

Sample Lookup Data

Here we have two values for two unrelated example Lookups:

Dynamics NAV Lookup Table

 

Adding a field to a table with generic validation:

The only trick is to put a hard coded filter in place to pick out the correct values from our generic table. In this way, users will only see the relevant values and will also only add new values with the correct Field Name.

Table Filter in Dynamics NAV

 

Our new field is now ready to be placed on any page.

 

Related Posts

  • We work with customers that currently use any version of Dynamics AX or Dynamics NAV. We can engage directly with you and your team to provide any of our services. We can…

  • The following is the most recently updated view of the support timelines for Microsoft Dynamics NAV.  Microsoft keeps this information on its support website, but I find it a little…

  • *This post was written for Dynamics NAV but the content directly applies to Dynamics 365 for Financials, which is the cloud product based on Dynamics NAV. You may notice some slight…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

july

16jul11:00 am12:00 pmConfab with Stoneridge - Livestream - Business Intelligence Power Hour

22jul10:00 am10:30 amOn the Job with Dynamics 365 - Manufacturing Material Handler

22jul12:00 pm1:00 pmImprove Field Service Delivery and Increase Customer Satisfaction

30jul11:00 am12:00 pmConfab with Stoneridge - Livestream - Power Apps Power Hour

august

05aug10:00 am10:30 amOn the Job with Dynamics 365 - Manufacturing Shipping / Receiving Department

05aug12:00 pm1:00 pmHow Ag Retailers Can Simplify Processing Equity Payments using Levridge

12aug10:00 am10:30 amWhy Levridge Grain? How to Achieve Efficient and Accurate Scale Tickets

12aug12:00 pm1:00 pmThe Three Paths to Dynamics 365 Finance and Supply Chain from Dynamics AX

13aug11:00 am12:00 pmConfab with Stoneridge - Livestream - Dynamics 365 2020 Wave 2 Preview

19aug10:00 am11:00 amWhat is Levridge? An Overview of the Ultimate Ag Solution

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X