How to create custom data entity for DIXF in D365

Description:- 

The purpose of this document is to demonstrate how we can develop a custom data entity for a custom table in Dynamics 365 for Operations.
  • Access to Dynamics 365 for Operations instance via remote desktop.
  • To be provisioned as an administrator for the instance.
  • Visual Studio project, model, package have been created.
  • Custom table has been created in the project.
Process:

We’ll be developing a data entity for a custom table, dev_Practice_Table for this scenario.

Before that we need to verify first on the table. Is there any Primary index, configuration key, Clustered Index, Replacement Key in the table? If you have not created then please create Primary Index on the table and assign appropriate property. Other you will get below error message while creating Data Entity for the table.
Create Index like below for table fields. Also check for Allow Duplicates property should be No in the Index.

After that select table and fill Primary Index property to newly created index like below.

Click Ctrl+Shift+A to add new item to the project or else you can right click on the project and select Add and after select New item.
Select Data Model > Data Entity, giving name dev_PracticeDataEntity. Click Add.
After that below popup will open in that Specify data entity properties as shown below and select dev_Practice_Table table as the Primary datasource. Click Next.
On the next screen of the wizard, review the data entity fields. You may choose to convert labels to field names.
After click on convert labels to field names check box the Data entity field name will be change and it take the label value as display on the data entity. Click Finish.
The following highlighted development artifacts must be created.

Open project properties and set Synchronize Database on Build to True to synchronize the newly created table and data entity with database. Build the project.

You have now successfully created a custom data entity! You can verify Data Entity in the D365 operation like below.
Go to Data management > Data Entities > search entity name “dev_PracticeDataEntity” in the filter.

Related Posts

Previous
Next Post »