Extending Microsoft Dynamics 365 Finance and Supply Chain Management Cookbook - Second Edition
by Simon Buxton
How it works...
When the user clicks New (or the form is opened with a menu item that has Open Mode set to Yes), the form triggers a task that calls the current data source's Create method. In our case, we must let the data source do this; however, at this point, we will open the create dialog using the Create method we wrote on the form handler.
The Create method is a standard way to call any form from code. Never use the form name as a string literal without using a compile-time function, in this case formStr.
This calls the create dialog, which is set up so that the normal form events no longer fire. We will initialize the form from the form handler class in order to pass the new record back.
Once control returns to our details form, we ...
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