Importance of Descriptor.xml In Dynamics 365 for Finance and Operations

In this post, the purpose and the significance of the Descriptor file used in Dynamics 365 for Finance and Operations/Dynamics 365 Unified Operations will be highlighted.

Descriptor.xml in Dynamics 365 for Finance and Operations

Reference packages:

A package is where the model resides and is located to the right of the model name. The model consists of elements that live within the Application Object Tree/ Application Explorer within Dynamics 365 for Finance and Operations/Dynamics 365 Unified Operations.

Descriptor File:

While customizing the objects in Visual Studio on a Dynamics 365 Unified Operations project (Dynamics 365 Unified Operations), we have base components that we need to re-use. These base components belong to a model, and this model is stored in a reference package. The metadata of this reference package is stored in a Descriptor file.

Add the Reference package in a Dynamics 365 Unified Operations project:
Scenario:

The requirement was to add fields to the Data Entity EcoResReleasedProductEntity, but the Data Entity has some standard fields that reference the Dimensions component. Now, we have added only the following reference packages while creating the new model.

  • Application Foundation
  • Application Suite
  • Application Platform

We created two extended components, one for the existing Data Entity (EcoResReleasedProductEntity) and one for the corresponding staging table for that data entity (EcoResReleasedProductStaging). We have called it as EcoResReleasedProductEntity. SampleFields and EcoResReleasedProductStaging. SampleFields. After adding the fields to the data entity EcoResReleasedProductEntity. SampleFields and to the appropriate staging table EcoResReleasedProductStaging. SampleFields, we try to build the project. On building the project, there is an error that we receive that states the DimensionSetEntity does not exist.

Descriptor.xml in Dynamics 365 for Finance and Operations

Fig 1 – Error Dimension related components 

This occurs because the Dimensions package is not referenced in the model. To do so, follow the steps highlighted below.

  1.    To add a reference package in the project, select the Dynamics 365 menu -> Update Model Parameters.

Descriptor.xml in Dynamics 365 for Finance and Operations

Fig 2 – Update Model Parameters 

2.   On the Update model parameters, select the model to add a reference package. Choose Next and pick the reference package that is        Dimensions, in this case.Descriptor.xml in Dynamics 365 for Finance and Operations

Fig 3 – Reference the Dimensions package

3.   Once the package is referenced, the summary page will display the list of referenced packages.

Descriptor.xml in Dynamics 365 for Finance and Operations

Fig 4 – Update model parameters

4.  Hit Finish and Build the model. This will update the Descriptor file with the referenced package. This is the most crucial step because if there are other developers connected to Visual Studio Team Services and if they are using the same model to do customization in Dynamics 365 for Finance and Operations, then the descriptor file will automatically be updated with the reference package for that developer, too. On building the project, those developers won’t receive any errors because the descriptor file that their metadata repository is referencing to is updated with the reference package.

Descriptor.xml in Dynamics 365 for Finance and Operations

Fig 5 – Build the Model

Once the model is built, build the project, and the error for DimensionSetEntity will be gone.

5.   Check the Descriptor file, and it should have the reference package in there.

Fig 6 – Dimensions Added As A Reference Package

References:

https://docs.microsoft.com/en-us/dynamics365/unified-operations/dev-itpro/dev-tools/models-export-import

Disclaimer: The Questions and Answers provided on https://www.gigxp.com are for general information purposes only. We make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose.
Avatar

Navneeth Nagrajan is a Technology Specialist at Deloitte Australia focussing on design, development, integration, and implementation of the Microsoft Power Platform (primarily PowerBI, Common Data Service and Flow) and Dynamics 365 for Finance and Operations ERP. Other areas of focus include Azure DevOps, Github (related to Dynamics 365 for Finance and Operations deployments), and Dynamics Lifecycle Services.Profile:Twitter: http://www.twitter.com/nav21n LinkedIn: https://www.linkedin.com/in/navneeth-nagrajan-94a9aa5/