Create a custom data entity in D365 F&O

 



What is Data Entity

This is a way to import or export the data in dynamics 365 Finance and Operations.

For Example; Amir (a consumer) wants to access data that is related to a customer, but this data is currently scattered across multiple tables, such as DirPartyCustTableLogisticPostalAddress, and LogisticElectronicAddress. Therefore, the process of reading and writing customer data is very tedious. Instead, the following customer entity can be designed to encapsulate the entire underlying physical schema into a single de-normalized view

No alt text provided for this image


No alt text provided for this image

Above images are taken from Microsoft official docs. Microsoft docs

Categories of Entities

Entities are categorized based on their functions and the type of data that they serve. The following are five categories for data entities.

Parameter

  1. Functional or behavioral parameters.
  2. Tables that contain only one record, where the columns are values for settings. Examples of such tables exist for Account payable (AP), General ledger (GL), client performance options, workflows, and so on.

Reference

  1. Simple reference data, of small quantity, which is required to operate a business process.
  2. Data that is specific to an industry or a business process.
  3. Examples include units, dimensions, and tax codes.

Master (Mostly used)

  1. Data assets of the business. Generally, these are the "nouns" of the business, which typically fall into categories such as people, places, and concepts.
  2. Complex reference data, of large quantity. Examples include customers, vendors, and projects.

Document

  1. Worksheet data that is converted into transactions later.
  2. Documents that have complex structures, such a several line items for each header record. Examples include sales orders, purchase orders, open balances, and journals.
  3. The operational data of the business.

Entity key on Data Entities

It must be unique. Mostly primary key columns or we can say independent columns likes salesId, we used in it.

Development Steps

How to develop Custom Data Entity using AOT query and View in D365FO?

Step 1: Create New dynamics 364 finance Operation project.

Step 2: Write click on solution explorer of your project and select “Add New Item”.

Step 3: Add Query and rename it.

Step 4: Add Data Source and change its three properties: First is name of your data source, second is Add Table, third is dynamics field property, set it No or Yes according to your requirement.

Step 5: Add relation.

Step 6: Right Click to your Solution Explorer, Add View in your project.

Step 7: Right Click on View your added, go to properties and Add your Query in Query Field.

Step 8: Drag the field you need to show on your view from the Data source of your Query, you last added in View.

Step 9: Add new Data Entity.

Step 10: Add View in your Entity data source by drag and drop and add the fields of your view in the fields of Entity.

Step 11: Add the id, status type fields in Entity Key Fields. Note: Never add Price, Tax type field in Entity Key Important: In entity property, we have a Property Primary company context, add dataAreaId of your root data source table inside this.

Step 12: Right click on your entity and Re-generate the staging table and update also by again right click on entity.

Step 13: Rebuild and Build the project.

Step 14: After build completed, your entity has developed successfully.

1)

No alt text provided for this image

2)

No alt text provided for this image

3)

No alt text provided for this image

4)

No alt text provided for this image

5)

No alt text provided for this image

6)

No alt text provided for this image

7) Computed Fields are highlighted with custom Methods used in computed fields

No alt text provided for this image

8) Custom Method for computed field creation

No alt text provided for this image

9) Highlighted entity properties must be filled

No alt text provided for this image

10) Drag the View in Entity data source. Below showing the fields of view while second highlighted fields are entity fields

No alt text provided for this image

11) Drag the fields from view fields to entity fields

No alt text provided for this image


12) Entity Key Columns

No alt text provided for this image

13) Re-generate and update staging table

No alt text provided for this image

14) Rebuild your project with DB sync (True).


Comments