Dynamics 365 F&O Package Deployment Using AXUpdateInstaller

Scenario:  A customization package was required to be deployed in the Dynamics 365 Finance & Operations virtual machine (VM). The deployment was performed using the AXUpdateInstaller u tility following standard Microsoft-recommended practices to ensure successful installation without service conflicts.  Pre-Deployment Preparation:  To avoid file blocking and deployment delays, the package ZIP file was downloaded directly into the VM rather […]

How to Write Clicked Method for Standard Forms Using Event Handlers

How to write clicked method for standard forms using event handlers.   Scenario: When there is a requirement to create an object in standard form and implement a business logic on that object. In my case, I have created the button object, and I have used the ‘OnClicked’ event handler to perform the action.  High level resolution […]

How to Write a Lookup Method for Filtering and Excluding Values Using a Container?

How to write a lookup method for filtering and excluding values using a container.  High level resolution steps  Scenario Write a lookup method for excluding values using a container, you need to initialize a query for the relevant table, use a container to specify which IDs to exclude, and then display the filtered results in […]

How to Utilize the Table Properties in X++?

How to utilize the table properties in X++?  Scenario: When a user creates a table, it is necessary to set the appropriate table properties to ensure data integrity, improve performance and enhance overall usability.  High Resolution steps  Detailed Resolution steps:  Step 1: Create a field in the table and set its extended data type to […]

How to Filter Multiple Values in Query?

How to filter multiple values in query. Scenario: In some scenarios, we may need to filter multiple records dynamically, where the criteria are not predefined or fixed at the time of writing the query. This requires constructing the query in a way that can handle varying conditions efficiently. High level resolution steps We can follow […]

How to get Progress Bar at the Time of Process Execution?

How to get progress bar at the time of process execution? Introduction: A progress bar is a visual representation of the status of a process, providing users with a clear indication of process execution. It enhances user experience by keeping them informed, particularly during long-running tasks like file downloads, data processing, or installations. High level […]

How to Use Like Operator in Dynamic Query and When to Use it?

How to Use Like Operator in Dynamic Query and When to Use it? Scenario: User wants to filter all the records from the SalesTable that contain the word “Contoso” when they run the runnable job. Note: SysQuery::valueLike() is used for filter all the records which matches the given condition/word. High level resolution steps Create a […]

Looping and control statements in Dynamics 365 for Finance and Operations

Looping and control statements

if() { //something goes here if() { //nested if } } else if (condition) { //else if logic goes here } else { //elese part goes here } switch(field) { case 1: //logic break; ….. case N: //logic break; default: break; } //Looping for (initialization; condition; increment/decrement) { } for(int i=0; i

Lookup method in Dynamics 365 for Finance and Operations

Lookup method

[DataField] class ModelID { /// /// /// /// /// public void lookup(FormControl _formControl, str _filterStr) { //super(_formControl, _filterStr); //Table Relations //select * from POLModelTable //where IsActive = Yes Query query = new Query(); QueryBuildDataSource qbdsPOLModelTable; qbdsPOLModelTable = query.addDataSource(tableNum(POLModelTable)); qbdsPOLModelTable.addRange(fieldNum(POLModelTable, IsActive)).value(queryValue(NoYes::Yes)); SysTableLookup sysTableLookup = SysTableLookup::newParameters(tableNum(POLModelTable), _formControl); sysTableLookup.addLookupField(fieldNum(POLModelTable, ModelId)); sysTableLookup.addLookupField(fieldNum(POLModelTable, ModelDescription)); sysTableLookup.parmQuery(query); sysTableLookup.performFormLookup(); } } } Copy

Important table methods in Dynamics 365 for Finance and Operations

Important table methods

public class POLMobileServiceTable extends common { /// /// When i initialize a record, this method will be triggered /// This method is not responsible for saving the record to database /// Rather it assigns value to BUFFER /// public void initValue() { super(); this.ServiceStartDate = systemDateGet(); this.ExpectedDeliveryDate = systemDateGet() + 5; } /// /// Validate […]