Where to write customized code

While writing your own customized code for Dynamics NAV, it is important to choose where to write that code. Code can be written in different places and the application will still work as you had intended. Unfortunately, not all places are good choices. Depending on where you write your code, it may be easier or more difficult to expand or change functionality. In this section, we will give you some guidelines for choosing where to write your code.

Validating fields

When a field is filled, a special trigger runs the OnValidate trigger of the field. For a given field, you will find an OnValidate trigger on the page where the user enters the data and also on the table itself. Whenever possible, write your code on the ...

Get Implementing Microsoft Dynamics NAV - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.