Dynamics NAV Development for Non-Developers: Part 5 – Adding a Simple Field to a Table

by | Updated November 5, 2020 | Development, Dynamics NAV

There is sometimes a need to store an additional piece of information about a thing (record) in Dynamics NAV, that does not have a home in the out-of-the-box structure. Often, this additional information is “informational” only and doesn’t need to influence system behavior, such as “look up” to another list, or driving new business rules. In these cases, adding a simple field might be all that is needed.

For purposes of this example, we will add a new field to the item table called “Website Description.” The goal of this field is to allow users to record the description of each item as it appears on the company website – for informational purposes only in NAV.

Adding a field to a table in NAV is relatively straightforward, but requires some care to prevent conflicts or loss of data. Additional information may also be found in the related MSDN Development series, How to: Add Fields to a Table .

To begin, new fields in “stock” tables need to be created in the 50000 to 99999 number range. New fields in custom tables can be created in any number range. Similarly, you can identify whether a table is “stock” or custom by its number: the range 50000 to 99999 typically reflects custom objects. Both the field number and field name must also be unique within the table. For our example here, we will add a new field to the “stock” item table.

Adding a New Field

A brief five-step process is identified below through screenshots. Some nuances related to these steps follows.

  1. Find and “Design” the table in the Development Environment (Object Designer)see previous NAV Development blog “Part 3: Knowing What I Want to Change” for more information related to identifying and locating the table.

Adding a New Field in Dynamics NAV

 

 

 

 

 

 

 

 

2. Insert a new field (F3) and assign a Field No., Name, Date Type, and Length (if applicable)

Insert New Field in Dynamics NAV

 

 

 

 

 

 

 

 

 

 

3. Select the Properties button (Shift + F4) to address any additional attributes

NAV Development

 

 

 

 

 

 

 

 

 

 

 

 

4. Exit the object until prompted to Save Changes

Save Changes in Dynamics NAV

 

 

 

 

 

 

 

5. Update the Version List and document your changes consistent with your partner’s approach/methodology

Upadate Version List in Dynamics NAV

 

 

 

 

 

 

 

 

Some additional (random) notes on field changes…

  • On tables, more than any other object, it is important to get your definition right the first time. Changing lengths, data types and some other field properties, after data has been entered into that field, can have destructive consequences.
  • The saving and compiling of a table should only occur in a database that users are not currently working within. As you should always be developing in a development environment/database, this shouldn’t be an issue. That said, once you are ready to move your updated object to Production, you will want to take the same precaution.
  • The properties of the field are often not needed, but there may be instances where you want to control foreign language captioning, table relationships or other attributes not inherently assumed when the field is created.
  • When working with field types, you will almost always want to use Code, Text, Decimal, Date or Boolean (checkbox). The distinction between Code and Text is the case sensitivity of the field. As an example, “No.” fields in NAV are type Code while descriptions are type Text. Regardless of what you enter in a “No.” field, NAV will force it to all upper-case. Entered lower-case letters in a text field will be maintained as entered.

 

The next entry in this series will describe the process to add a field (column) to a list page. In it, we will expose our new “Website Description” field to the Item Card, so users are able to see and edit it.

For more on Dynamics NAV Development for Non-Developers, check out the rest of the series.

 

Related Posts

0 Comments

Submit a Comment

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

Upcoming Events

june

02jun2:00 pm2:30 pmBusiness Intelligence for Batch Manufacturers

16jun10:00 am10:30 amHow AP automation can speed up month-end close in D365 Finance

17jun11:00 am12:00 pmConfab Live with Stoneridge – Real Time Marketing Strategies for Success

23jun10:00 am10:30 amThe Modern Manufacturer: Cost Accounting in D365

30jun10:00 am10:30 amAP Automation Checklist for a 2022 Rebound

30jun2:00 pm2:30 pmAchieving Success: How Technology Is Helping Nonprofits Thrive

july

01jul11:00 am12:00 pmConfab Live with Stoneridge – Dataverse Virtual Entities

14jul12:00 pm12:30 pmBeyond Reporting - What Business Intelligence Can Do For Your Agribusiness

15jul11:00 am12:00 pmConfab Live with Stoneridge – Integration Strategies for End User Success

21jul10:00 am10:30 amThe Modern Manufacturer: Manufacturing Software in the Real World

21jul12:00 pm1:00 pmIs it Worth it to Upgrade to Dynamics 365 Finance and Supply Chain Management? - Everything AX Users Need to Consider

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