Chain Of command – Forms – Dynamics 365 for Finance and Operations – X++

Posted by

Chain of Command now supports the more scenarios for the extensions on forms:

Now you can wrap the methods on forms, Forms data sources, Datafields and on form control methods.

  1. Forms
  2. Form Data Sources
  3. Form Controls
  4. fields in data sources

Below is the complete example of Form Data source and just a code snippet for the rest. In below example we are updating the ratingmodel based on our custom logic that is global variable on the form.

Note: use element.FormToExtendVariable to access the form variables and datasources

Use element.FormToExtendMethod() to call the form methods

Screen Shot 2019-11-03 at 3.20.34 PM.png

 

  1. [ExtensionOf(FormStr(FormName))] // for form extension
  2. [ExtensionOf(FormControlStr(FormName,FormControl))] // for form control method extension
  3. [ExtensionOf(FormDataFieldStr(FormName,FormDataSource,DataField))] // for form datasource method extension
  4. [ExtensionOf(FormDataSource(FormName,FormDataSource) // for form data source extension
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.