Chain of command on forms


Chain of command now supports even more extension scenarios on forms. It is now possible to wrap:

  1. Methods on the root of the form.
  2. Methods on controls.
  3. Methods on data sources.
  4. Methods on fields on data sources.

So far you can only wrap system methods on the latter 3, i.e. methods that are defined on the Form<Type>Control, FormDataSourceObject and FormDataSet classes, respectively. You can wrap any method defined in the root of the form. Also, there is no support for extending multiple forms, controls, data sources or fields within the same extension-of class.

Examples:

[ExtensionOf(formStr(SomeForm))]
[ExtensionOf(formControlStr(SomeForm, SomeControl))]
[ExtensionOf(formDataSourceStr(SomeForm, SomeDataSource))]
[ExtensionOf(formDataFieldStr(SomeForm, SomeDataSource, SomeField))]

See more here: https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/extensibility/method-wrapping-coc

 

THIS POST IS PROVIDED AS-IS AND CONFERS NO RIGHTS.


Comments (1)

  1. trud says:

    And you can create such classes in one click using Add-ins from GitHub
    https://github.com/TrudAX/TRUDUtilsD365#create-extension-class

Skip to main content