Thursday, March 10, 2022

D365 F&O CREATE A DATA ENTITY

 

PURPOSE:

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.

PREREQUISITES:

  • 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.

BUSINESS REQUIREMENT:

Ability to perform data operations on custom table.

DEVELOPMENT:

1. Open Visual Studio 

2. Click Ctrl+Shift+A to add new item to the project.

3. Select Data Model > Data Entity, giving name DataEntityTest. Click Add.

A Wizard will opens. Choose the primary data source (i.e. VendTable). Click Next

Choose the fields you want to show in your data entity. Click Finish

Data Entity, Security Privileges and Staging Table will be created

If you set “Is Read only” to No the data entity will be valid only for Exporting data and not for import. Otherwise set value to Yes to be able to import data to the VendTable

Staging table must be generated. You can do it by right clicking Data Entity and click on “Regenerate staging table”

Synchronize database and Build the solution

Now you have to Refresh data entity to make it visible in Data Entity framework in D365FO.

Open D365FO, go to System Administrator, Data Management

Click on Framework parameters

Switch to Entity settings and click on “Refresh Entity list”. Wait until job will finish. It will take some times.

After job has finished you can search your Entity by clicking on Data Entity Tile and search the entity

Now you have to Map the Staging table fields with target Entity

Go to Data Entity, search the entity and click on “Modify target mapping”

Click on “Generate mapping”

If you click on “Mapping Visualization” you’ll see the mapping.

For convenience I have entered only one field (AccountNum)

No comments:

Post a Comment