Enter the key words to find the related topics

Composite Entity in D365


Create new project from Visual Studios.

Navigate to File->New->Project.

Name it as CR_CustomEntity.

Navigate to Solution Explorer, right click on Project, select New Item under Add.

Select Table under Data Model (Operations Artifacts).

Name it as DICustTable.

Add two fields
  • ID(string)
  • Name(string)
Create Index name it as IDX, add ID field in that.

Change Primarykey property to IDX .



Now create second table name it as DICustInfo.

Add two fields.
  •  ID
  • Address
Create Index name it as IDX, add ID field in that.

Change Primarykey property to IDX .

Create Normal relation name it as DICustTable, as shown below.


Set the properties as shown below.






Now right on DICustTable, select Create data entity under Add-ins, as show below.



After clicking , staging table, security privileges, entity are created.

Table
  • DICustTableStaging
Security privileges
  • DICustTableEntityMaintain
  • DICustTableEntityView
Data Entities
  • DICustTableEntity

Now Similarly, do for DICustInfo same as DICustTable.

After completion  staging table, security privileges, entity are created.

Table
  • DICustInfoStaging
Security privileges
  • DICustInfoEntityMaintain
  • DICustInfoEntityView
Data Entities
  • DICustInfoEntity

See below picture for clear image.



Now create below two fields in two Staging tables(DICustTable, DICustInfo)

  • RowId(Integer)
  • ParentRowId(Integer)
Now create new foreignKeyRelation on DICustInfoStaging table, add field relations as shown below.




 Set below properties




Now navigate to solution explorer, right click select new item under Add.

Select Composite Data Entity under Data Model (Operations Artifacts).

Name it as DICompositeEntity.

Now right click on DICompositeEntity, select New Root  Data Entity Reference



Set the below properties.


Now again right click on DICustTableEntity, select New Embedded Data Entity Reference, set the below properties.




Now you can Import and Export from User Interface .





No comments:

Post a Comment