Wednesday, 30 May 2018

Create custom data entity in AX / D365FO / AX 7

Purpose:
The purpose of this document is to show how to create custom data entity for custom table in Dynamics 365 for Operations.

Business requirement:
To perform data migration operations on custom table

Development:
Creating data entity by using data entity wizard.

Step #1 To demonstrate we are creating data entity for custom table HREvaluationProcess.
  1. Right click on your project and then click on Add > New item 
  2. Select Data Entity, and then set the Name property to HREvaluationProcessEntity
  3. Now set data entity properties. Select HREvaluationProcess as Primary datasource and Click Next.
  4. Now add fields to the entity from data source and click Finish. Data entity and staging table are added to the project.
  5. Build and sync the project.

Creating data entity by using addins























Consume data entity.











Adding custom reference field to Data Entity Extension in D365 / AX 7


 Purpose:
The purpose of this document is to show how to add a custom reference field in the existing data entity

Business requirement:
Adding custom reference field to the existing data entity. 

Development:
To demonstrate we have added compensation level reference in HcmPositionDetail table. We need to add this field in the existing data entity HcmPositionDetailEntity


Step #1 Creating HcmPositionDetailEntity entity extension

















Step #2 In order to add the reference field we need to add the reference data source first and creates the relation

Here in our case the data source we need to add is ‘HcmCompensationLevel’.





Step #3 Creating extension of data entity staging table. Here the staging table  is HcmPositionDetailStaging























Step #4 Adding custom field to the staging table. 

Step #5 Now build and sync the project

Step #6 You have now successfully added custom field. You can verify if the custom field added or not go to

Workspaces > Data Management > Data Entities > Search data entity > Click on Modify Target Mapping












Difference Between Edit And Display Method in Ax

Display Method: The display method means that the method’s return value is being displayed on a form or a report.  This value is fixed and c...