O'Reilly logo

Microsoft Dynamics NAV by Mark Brummel, Christopher Studebaker, David Studebaker, David Roys, Vjekoslav Babić, Cristina Nicolàs Lorente, Laura Nicolàs Lorente, Alex Chow

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Encapsulation

Although encapsulation is considered one of the four cornerstones of OOP it is not limited to this, and can be implemented in Dynamics NAV as well. When implementing encapsulation, we hide the components from being wrongly used.

In other words, we indicate to other developers which functions can, or cannot be used outside the class, or as in Microsoft Dynamics NAV, the object.

This is achieved by implementing the local functions. Microsoft Dynamics NAV allows functions to be global or local. Global functions are allowed to be called from outside the object; local functions can only be used inside an object. In C#, these would be public and private functions.

When we want a function to be local, traditionally in C/AL we have to explicitly ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required