Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
This was a relatively simple example to show how to create a class to handle the form user interface, this time just to make a record editable or not. This wouldn't usually necessitate a class for this purpose, but it is much easier to refactor the code when this is already in a class. For example, we could decide to have a subclass for each service status or vehicle type in order to better encapsulate the type-specific logic. This is relatively simple when the user interface logic is handled in a class.
When a form opens, the first usable call is to init. This init method builds the form controls and instantiates the data sources' objects. We override the init method to initialize the internal state variables and to perform ...
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