Programming Microsoft Dynamics NAV - Fifth Edition
by Marije Brummel, David Studebaker, Christopher D. Studebaker
Codeunits
A codeunit is a container for chunks of C/AL code to be called from other objects. These chunks of code are called Functions. Functions can be called from any of the other NAV object types that can contain C/AL code. Codeunits can also be exposed (published) as Web Services. This allows the functions within a published codeunit to be invoked by external routines.
Codeunits are suited structurally to contain only functions. Even though functions could be placed in other object types, the other object types have superstructures that relate to their designed primary use, such as pages, reports, and so on.
Codeunits act only as a container for C/AL coded functions. They have no auxiliary functions, no method of direct user interaction, ...
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