Façade

When working with objects and methods in ERP, we traditionally implement them directly. In other words, we implement tight coupling. The class calls the method, and the method only accepts calls from the object. We cannot run a Codeunit with a record that it does not relate to. This ensures a contract, the table, between the class and the method, allows the compiler to check integrity and prevents the software from being wrongly used.

In C/AL Code, this would look like: SalesPost.RUN(SalesHeader), which ensures a tight contract between the Codeunit (SalesPost) and the table (SalesHeader).

Façade

In OOP, we can also implement loose coupling. When this ...

Get Microsoft Dynamics NAV now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.