Posts

Showing posts with the label Multi-select lookup field

Dynamics 365 Finance & Operations: Adding multi-select lookup field in System parameters form using form extension

Image
Create a table extension for SystemParameters table and add new string field. Create form extension for SystemParameters form and added FormStringControl   for that multi-select control fields.   Create new form extension class as final class and defined the private fields. Copied Post init event handler from System Parameters form. Then from event handler method calling new method to initialize SysLookupMultiSelectCtrl private variable from required query/queryrun. Copied OnQueryExecuted event handler from System Parameters form data source. Once form is loaded with a record, the lookup should select the values which are already stored in those fields by default. For that from event handler method calling new method to update SysLookupMultiSelectCtrl private variable and to initialize private table buffer.   Copied OnModified event handler for the multi-select fields. After fields are modified, those values are stored in table fields. With this changes, y...