Programming Microsoft Dynamics NAV - Fifth Edition
by Marije Brummel, David Studebaker, Christopher D. Studebaker
Custom functions
We can also create our own custom functions to meet any need. The most common reason to create a new function is to provide a single, standardized instance of logic to perform a specific task. When we need to use the same logic in more than one place, we should consider creating a callable function.
We should also create a new function when we're modifying standard NAV processes. Whenever more than three or four lines of code are needed for the modification, we should consider creating the modification as a function. If we do that, the modification to the standard process can be limited to a call to the new function. It's usually not a good idea to embed a new function into an existing standard function. It's better to clone ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access