web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / xRMCenter / Entering to xRM World Part ...

Entering to xRM World Part 11 – Entity Mapping

nghieppham Profile Picture nghieppham 4,755

In many cases, we need data automatically filled from other entity to another entity. Of course, we can implement it by managed code or client script code, but it is bore task in sometime, how can we do it without coding?

Let’s consider this situation: You create new contact, fill all address of contact, then we create new order of this contact and we want to copy all the address to Billing Address of Order entity without coding.

This article will write about Entity Mapping feature of Microsoft Dynamic CRM, it will give you more option that you can choose for specific requirement.

Entity Mapping steps by steps

Example situation: You have event entity to  store all event of your event. When contact (person registration) register to join event, you need to populate event type & start date to Contact entity.

 Step 1: You need to define 1:N relationship from Event and Contact entity.

Map1

Step 2: Click New to manual create attribute mapping

Map2

Step 3: Save and publish your customization.

Go back your crm client, select your event and add new joined contact.

map3

Add new contact, you will data will be mapped automatically.

map4

Now you continue to add 1 more contact but you select the existing contact.

  • The result is no fields are mapped.

Then you go to contact and create new contact, select Event

  • The result is no fields are mapped.

map5

In fact, this is limitation or not, we cannot give the conclusion, because Microsoft CRM support many technologies for your choosing, in this case you can use business rule to configure check the Event and map your needed data.

I cannot tell you which is better, which is the best, it depend on you and on your requirement, this article just want to give to you all the options that you can use.

Key notes for Entity Mapping

  • Target & source mapping must be the same data type and size
  • Allowing to mapping one source to many attributes in the target entity
  • We can overwrite mapped value before saving
  • Mapping pre-populates defines in a new record with information from the parent object
  • Attribute mapping data entry when creating new records that are related to parent record.

Hope it will be useful for someone.



This was originally posted here.

Comments

*This post is locked for comments