Integrate Dynamics 365 for Finance and Operations with CDS


  • Dynamics 365 for Finance and Operations
  • Common Data Service


The purpose of this blog is to demonstrate how we can integrate Dynamics 365 for Finance and Operations with Common Data Service (CDS).


  • Basic understanding of Common Data Service and PowerApps Admin Center


Create a new custom entity for Vendor and add relevant fields

Create a new connection set in PowerApps Admin Center. Select Finance and Operations as the source environment and CDS as the target environment. Give in relevant organization details.

Create a new Data Integration Project in PowerApps Admin Center. Select Fin and Ops to CDS template.

Select the previously created connection set and then select the relevant organization.

Once the project is created, add a new task to the project, selecting the relevant source and target entities.

Configure field mappings.

Finally run the project.

Bingo! Data flows from Dynamics 365 for Finance and Operations to CDS.

You can schedule the Data Integration Project as well!


D365FO: The path is already mapped in workspace


Dynamics 365 for Finance and Operations


The purpose of this blog is to explain how can we resolve the version control workspace issue while working with Azure DevOps version control, previously known as VSTS or TFS.


The path % is already mapped in workspace %


First make sure that no other workspace is mapped to this path (including remote workspaces).

Sometimes the trick could be to clear the TFS cache on client machines

  1. Close all instances of Visual Studio on the client machine
  2. Manually delete the corresponding TFS client cache folder
  3. Start Visual Studio

The path to TFS client cache folder varies depending on the TFS version. Delete contents of the cache folder to resolve the issue:

Tfs 2017: “%localappdata%\Microsoft\Team Foundation\7.0\Cache\”
Tfs 2015: “%localappdata%\Microsoft\Team Foundation\6.0\Cache\”
Tfs 2013: “%localappdata%\Microsoft\Team Foundation\5.0\Cache\”
Tfs 2012: “%localappdata%\Microsoft\Team Foundation\4.0\Cache\”

AX 2012: Existing DIXF service for new AOS instance


Dynamics AX 2012


The purpose of this document is to explain what we can do to reuse a DIXF service of an existing AOS instance for a new AOS instance


Copy paste the following files from the bin folder of an existing AOS instance to the bin folder of the new AOS instance:

  • DMFClientConfig.xml
  • DMFConfig.xml
  • Microsoft.Dynamics.AX.Framework.Tools.DMF.ServiceProxy.dll.config

D365FO: Data entity filter on enum field

To filter data entity using an enum field, we need to use a specific query expression syntax. For example, to filter Purchase order header data entity, PurchaseOrderHeadersV2, to get only ‘Confirmed’ purchase orders, we can add filter to DocumentApprovalStatus entity field which sources its value from VersioningDocumentState enum like below:$filter=DocumentApprovalStatus eq Microsoft.Dynamics.DataEntities.VersioningDocumentState’Confirmed’


As you can see below the query filter successfully filters Purchase order header entity to get only ‘Confirmed’ purchase orders:


AX 2012: Create SSRS Line Chart Report




The purpose of this document is to demonstrate how we can leverage the power of business intelligence through a simple SSRS line chart report.


  1. Visual Studio 2013
  2. Visual Studio 2013 tools.
  3. Reporting extension.
  4. Report Builder.
  5. Should be well-versed in Report Programming Model.

Business requirement:

Leverage business intelligence by analyzing sales trends for top item groups over the period of time.

Project overview:



We will be following the Report Programming Model to develop a precision design report.

1. Create an InMemory table, MakItemSalesHistoryTmp. This table will be used as a data set for the report in Visual Studio.


2. Create an AOT query, MakItemSalesHistory. This query will be used in the Data Provider class to fetch records for the report.


3. Create a data provider class, MakItemSalesHistoryDP. Bind the AOT query with it.

class MakItemSalesHistoryDP extends SRSReportDataProviderBase
    MakItemSalesHistoryTmp  makItemSalesHistoryTmp;
public MakItemSalesHistoryTmp getItemSalesHistoryTmp()
    select makItemSalesHistoryTmp;
    return makItemSalesHistoryTmp;
private void insertTmpTable(SalesLine _salesLine)
    Qty                 qty;
    Date                shipDate;
    InventItemGroupItem groupItem;

    qty = _salesLine.QtyOrdered;
    shipDate = _salesLine.ShippingDateConfirmed;
    groupItem = InventItemGroupItem::findByItemIdLegalEntity(

    makItemSalesHistoryTmp.ItemId = _salesLine.ItemId;
    makItemSalesHistoryTmp.ItemGroupId = groupItem.ItemGroupId;
    makItemSalesHistoryTmp.Price = _salesLine.salesPrice;
    makItemSalesHistoryTmp.Amount = _salesLine.SalesPrice * Qty;
    makItemSalesHistoryTmp.Qty = qty;
    makItemSalesHistoryTmp.Year = year(shipDate);
    makItemSalesHistoryTmp.MonthOfYearId = mthOfYr(shipDate);
    makItemSalesHistoryTmp.Days = dayOfMth(shipDate);
public void processReport()
    Query                   query;
    QueryRun                queryRun;
    QueryBuildDataSource    qbds;
    QueryBuildRange         qbr;
    SalesLine               salesLine;
    InventItemGroup         ItemitemGroup;

    query = this.parmQuery();
    qbds = query.dataSourceTable(tableNum(InventItemGroupItem));"InventItemGroupItem");

    qbr = qbds.addRange(fieldNum(InventItemGroupItem, ItemGroupId));
    qbr.value(strFmt('((%1.%2 == "Speakers") || (%1.%2 == "Television"))',,
        fieldStr(InventItemGroupItem, ItemGroupId)));

    queryRun = new queryRun(query);

    while (
        salesLine = queryRun.get(tableNum(salesLine));

4. Create a controller class, MakItemSalesHistoryController. You can observe, how the report dialog has been suppressed in the controller.

class MakItemSalesHistoryController extends SrsReportRunController
static void main(Args _args)
    MakItemSalesHistoryController controller;

    controller = new MakItemSalesHistoryController();
    controller.parmReportName(ssrsReportStr(MakItemSalesHistory, LineChart));

5. In Visual Studio 2013

  • Create a new Project
  • Add new Report to the solution.
  • Add new Dataset, MakItemSalesHistoryTmp, of type Report Data Provider.
  • Choose MakItemSalesHistoryDP class in the Query.
  • Add new precision design, LineChart, to the report Designs node.


6. Edit LineChart using Designer.
7. Insert a new Chart report item from the Toolbox.


8. Double click on the chart area to open the field editor, add the following fields as specified.

Field Drop area
Year, MonthOfYearId Category
ItemGroupId Series
Qty Data

9. Next, you can improve the aesthetics of the chart, as it pleases, by updating different chart properties available out of the box in Visual Studio.
10. Save, build and deploy the report.
11. Create an output menu item and bind it with the SSRS report.


12. Add menu item to Sales and marketing > Reports > Sales orders > Item sales history.
13. You should be able to see the report in the Report viewer.


AX 2012: Automated build deployment process


The purpose of this document is to describe how we can deploy automated builds to different Dynamics AX pre-production environments so that newly developed features could be rolled-out for UAT. The document also illustrates how version controlling by TFS and data migration activities fit into the big picture.

Business requirement:

Ability to release, deploy automated builds to different Dynamics AX pre-production environments to roll-out newly developed features, bug fixes for testing.


  • Dynamics AX Management Utilities have been installed and configured.
  • Build scripts have been installed and configured.

AX pre-production servers topology:



  1. ISV model server (Optional)
    1. Only applicable when an ISV model needs to be updated in the next build.
    2. TFS Force sync.
    3. Perform full compile, full CIL, DB synchronization.
    4. Export ISV model.
  2. Build server
    1. Must have 2 AOS instances, build and deploy. Both must not be connected to TFS.
    2. Copy ISV model to file system.
    3. Uninstall existing ISV model from build instance.
    4. Uninstall existing ISV model from deploy instance.
    5. Install new ISV model to build instance.
    6. Install new ISV model to deploy instance.
    7. Restart AOS service of build instance.
    8. Restart AOS service of deploy instance.
    9. Perform full compile, full CIL, DB synchronization on build instance.
    10. Perform full compile, full CIL, DB synchronization on deploy instance.
    11. Run build command, buildax.ps1, on build instance.
      1. Output is CUS model file created on the file system.
    12. Run deploy command, deployax.ps1 on deploy instance.
      1. Output is modelstore file created on the file system.
  3. ConsTest server
    1. Copy modelstore file to file system.
    2. Import modelstore file via powershell.
    3. Restart AOS service.
    4. Perform full compile, full CIL, DB synchronization.
  4. Document newly developed features and bug fixes in release notes.
  5. Email the notification and release notes to business stake holders.