Configure Dynamics365 Finance and Operation(D365 FO) VM

Before you start doing any development for D365 FO there are some configurations which are recommended to make. (Note: Below configurations are not mandatory but recommended)

  • Rename D365 FO machine: It’s good practice to rename VM machine to some meaningful name. This becomes necessary if we have multiple VM’s connected to same Visual studio team service site(VSTS) as VSTS cannot accept same work space name while mapping folder’s. Follow below steps to successfully rename D365 FO VM.
    • Right click “This PC” icon and click properties.
    • On the System windows click on “change settings”.
    • On “My property” window” click on “Change” button.
    • Type a  new name e.g. “D365FO-Dev-Suri-Office” or any name of your choice and click Ok.
    • After that restart your VM machine to reflect the name change.
  • After restart of machine check the name has successfully changed. Next step is to change the reporting service database, this mandatory to do after rename of VM machine.
    • Open  reporting service configuration manager and connect to default instance which is using in D365 FO microsoft VM1
    • After connect go to “Database” tab and click on change database and select “Choose an existing report server database” on the “Report server Database Configuration Wizard” and click “Next”.2
    • On next page change server name to “.” a dot which denotes to connect to local database server in SQL terminology. and click “Next”.3
    • On next page select the reporting service database in “AX7 RTW June update” VM it is “DynamicsAxReportServer” and click Next.4
    • One next page put SQL authenticate keep it default and move to next page “Summary” and make sure things looks ok and click “Next”.
    • After clicking “Next” on “Summary” tab database change name process start and should be successful and that’s it.5


  • Configure Visual studio team site in Visual Studio: The next is to connect your Visual studio to your project team site or customer team site.
    • Open Visual Studio and click on “Team” menu and click “Manage connections”.6
    • Now click on “Server”  button and add the VSTS site URL and click “OK” button. You must use the credentials which have access to this VSTS site url.6
    • One authenticate succeeded your you must see the project collection and team projects. Select your default team project which is “Front” in this scenario and click connect.7
    • Now you should see a team explorer pane on right side inside Visual Studio explorer. Click “Source control explorer”.7
    • Now we need to map the VSTS site project folder with their local repository or folder. Select “Metadata” folder on left pane and click “Not mapped” on right. This needs to map with with our “D365 FO” “PackageLocalDirectory”. In June2016 VM update “PackageLocalDirectory” exist at “C:\AOSService\PackageLocalDirectory”.So map source Metadata folder to this location. [Note: remove metadata from the path if it shoes in “Local folder & make sure Recursive is checked”].9
    • Next is to map the “Project” folder. This is where your Visual Studio solution files and project file will be saved.Map it to default location.10

That’s it. You VM is now ready for development and you can now able to add your development to VSTS site so that other developer can do the “GetLatest” to always have the update version of code.

At last but not least you need to first time build/compile the all models and full database sync so that customized model objects can be compiled and sync to your local VM successfully.

I will write my next blog on how to add “AX7″ model and other AOT objects to VSTS” soon. So watch this space :).


InventDimID not specified error while importing data using data entity – New Dynamics AX RTW[AX7]

Recently while working on data import using data entity in AX7 or new Dynamics AX RTW, I have faced an error in my custom built data entity . I have created a new data entity for importing the Item GTIN codes which has a field called InventDimId and have foreign key relation with InventDim table. My data entiy has a very basic design. It has only one table in data source and InventDimId is not even selected as  data entity field as you can see below picture.


Everthing was as per the Microsoft guidelines but still while importing the data I got an error “InventDimId” is not specified, even after assigning the value through code or through data file I got a different error “InventDimId” is read only and that creats a frutstration what is wrong. After deep digging and looking some standard Microsoft provided data entity I found the solution and here are the steps to fix it.

  1. First create a new data source with table “InventDim” under your primary data source in my case I have created new data source under “InventGTIN” and link both using relationshio “InventDim” as you can see here.Fixed data source
  2. Next is to override a standard method called “mapEntityToDatasource” in your data entity and write below code in that method

Method override

public void mapEntityToDataSource(DataEntityRuntimeContext _entityCtx, 
DataEntityDataSourceRuntimeContext _dataSourceCtx)
   super(_entityCtx, _dataSourceCtx);
   switch (
      case dataEntityDataSourceStr(SalesOpenSalesPriceJournalLineEntity,
         InventDim inventDim = this.InventInventoryDimensionEntityFieldsMapping::resolveInventDim();_dataSourceCtx.setBuffer(inventDim);

save your changes and update your staging table for data entity and that’s it.