Monday, March 5, 2018

Loop through all the records on a form in D365O

Below sample code can be used to loop through all the records on a form in D365O

Assuming that we want to infolog a field value for all the records on the screen on the click of a button.

Step 1: Create a new class
Step 2: Add the below code which should be called on the click of the button and info the required field details

static class Test_LoopThruRecords_Extension
    /// <summary>
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    [FormControlEventHandler(formControlStr(InventItemOrderSetup, Test_BtnLoopThruRecords), FormControlEventType::Clicked)]
    public static void Test_BtnLoopThruRecords_OnClicked(FormControl sender, FormControlEventArgs e)
        FormDataSource              InventItemPurchSetup_ds  = sender.formRun().dataSource("InventItemPurchSetup"); //DataSource form InventItemPurchSetup

        InventItemPurchSetup        localInventItemPurchSetup = InventItemPurchSetup_ds.getFirst() as InventItemPurchSetup;

                localInventItemPurchSetup = InventItemPurchSetup_ds.getNext() as InventItemPurchSetup;


Sunday, March 4, 2018

Code for display method to find/stimulate the purchase price for an item and vendor

Code for display method to find/stimulate the purchase price for an item and vendor

PurchLine               purchLine;
InventDim               lInventDim;
UnitOfMeasureSymbol     unitId = 'PCS'; //Or get default purchase unit
ReqItemTable            reqItemTable; //To get approved vendor for item

//Create instance of Inventory dimension table
lInventDim.InventLocationId  = InventDim::find(_this.InventDimIdDefault).InventLocationId;
lInventDim.InventSiteId      = InventDim::find(_this.InventDimIdDefault).InventSiteId;
lInventDim = InventDim::findDim(lInventDim);

reqItemTable = ReqItemTable::find(_this.ItemId,lInventDim.InventDimId);

//Create an instance of purchLine table and set it to tmp
purchLine.VendAccount   = reqItemTable.VendId;
purchLine.InventDimId   = lInventDim.inventDimId;
purchLine.PurchQty      = 1;
purchLine.PurchUnit     = unitId;
purchLine.ItemId        = _this.itemId;

return purchLine.PurchPrice;

Can be modified to display the sales price as well.


Wednesday, August 2, 2017

Data Validation Checklist in Dynamics 365 for Operations

In the latest release of Dynamics 365 for Finance and Operations, Enterprise Edition there is now a check list feature for creating new setup in the system. It lets you enter a set of tasks within a configuration area and attach a menu item link for each task. Then you select the companies that this falls under and the task is then duplicated for each company and you can select the performing user for each particular company task.

Click on the below link to get the details. Credit:

Data Validation Checklist 


Wednesday, July 26, 2017

What an idea!!!

This is a great initiative by Microsoft. Customers and Partners can help improve Microsoft Dynamics 365 and its family of products and solutions by discussing ideas, providing suggestions, and giving feedback. Use the forums listed below for the respective areas.

Users can 
1. Suggest a new idea
2. Look for Top ideas
3. Look for Hot ideas
4. Look for New ideas 
5. Look at the ideas and click for more details

Thursday, July 6, 2017

Microsoft Dynamics 365 and ExpressRoute - Whitepaper

ExpressRoute adds the most value when used with Dynamics 365 in providing compliance with a regulatory need for data to never transit across the public Internet. It can also assist in scenarios where routing Dynamics 365 traffic separately from general Internet traffic can help with predictability of performance to a business-critical applications such as those offered with Dynamics 365.