Posts

Showing posts from 2021

Dynamics 365 Finance & Operations Release pipelines import.

Image
Download release pipeline Json/Yml file for your version from github  samples which is for Microsoft hosted agents . Go to Azure Devops and go to Pipeplines page. Click on right side pipe symbol and click "Import a Pipepline" shown below. Once imported, most of the values will be blank and need to be fixed. If you have build VM, then upload attached Json file and modify.

Dynamics 365 Finance & Operations: Defining delegate and calling them

Image
In this blog, I will show how “Is default attachment” is shown in document attachment form, when user opens it from “Accounts payable > Invoices > Pending vendor invoices” and “Accounts payable > Inquiries and reports> Invoice > Invoice journal”. This is done using delegate “ShowDefaultAttachmentField” used in DocuView form in application foundation model and handler class, DocuViewExtension class in application suite. The delegate is declared in form declaration as shown below. The delegates instance is defined in doReSearchFormRun method which is called from doReSearch method. For a delegate to be properly handled, the delegate method declaration, the delegate instance, and the delegate handler must have the same method signature. Since delegates do not have a return value, an EventHandlerResult is passed as a parameter to provide access to the needed result value after the delegate has returned. The delegates are shown in the events node of the form like...

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...