Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
There isn't anything new in the first section, so we will focus on the extension part of the recipe.
The declaration is interesting. Compile-time functions such as formStr and tableStr just return a string, and are used to cause a compilation error should the element not exist. In the case of extensions, they serve a second purpose: to determine the type of the element. This is needed as forms can have the same name as a class or table.
The naming convention we used for global variables and methods results in long names, which may seem to contain unnecessary prefixes. We are not creating a new class. We are creating an extension class that augments the element referred to in the ExtensionOf attribute.
Every method and variable ...
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