Wednesday 1 July 2020

Entity mapping for fields in Microsoft Dynamics CE

Customizing entities is a norm when you extend in Dynamics CRM. I came across entity mapping twice so I decided to blog this as a reference to me and any other finding solution.

It quite easy to map attributes in entities with visible relationships in Dynamics CRM but for hidden relationships, you have to go through some steps to map these custom fields/attributes

Prerequisites before mapping:

Ensure there is an existing relationship between the entities and get the Mapping ID: You can confirm through

Get EntityMap Id

  • Get All Entity Maps: This displays a list of all mapping existing in your environment. 
[Organization URI]/api/data/v9.0/entitymaps?$select=sourceentityname,


  • Get a Specific Entity Map: Between SalesOrderDetail and InvoiceDetail
[Organization URI]/XRMServices/2011/OrganizationData.svc/EntityMapSet?$
select=EntityMapId&$filter=SourceEntityName eq "salesorderdetail" and
TargetEntityName eq "invoicedetail"
The EntityMapId will be the same

Create Mapping

Use the entitymapid
[Organization URI]/Tools/SystemCustomization/Relationships/Mappings/

No comments:

Post a Comment