Dynamics 365 Entity Field Mappings Explained

I have a lot of ideas for blog posts coming over the next few weeks that I think you will find not only helpful but informative, quite a bit of unique stuff on Portals another Dyn365 goodness.

Today I am going to recycle another one of my BDO Insights posts regarding Dynamics 365/CRM entity field mappings.

I have a client that was adding some fields to both their Lead and Opportunity entities and was getting frustrated when they would put values into the Lead fields and these would not show up in the corresponding Opportunities that were created from the Leads.

One of the “quiet” features of Dynamics CRM that sometimes causes confusion is the Field Mapping in relationships.

The purpose of field mappings is that when you create an associated record from another record (e.g. create an Opportunity from a Lead, create a Contact from an Account) is that certain values copy over from one record to another.  e.g. address fields, etc.

Note that this is just a copy mechanism when the record is created.  Updating values in the target entity will not “roll back up” to the source entity and updating values in the original record will not roll down to the child entity.  (e.g. updating an address in accounts will not update the address in contacts).

There are other ways to achieve those requirements (quick view forms, workflows, plug-ins, etc).

The following are simple steps to create relationship field mappings.

Go into customizations and find the Lead entity, and then find the “1:N Relationships”

1-fieldmapping
Relationships in Entities

Locate the relationship that you want to make sure values carry over, in this case, lead to opportunity.

2-fieldmapping
Find the Relationship where you want data to move

In the relationship editor window, click on Mappings

3-fieldmapping
Mappings are where the magic happens

Locate the SOURCE from the starting entity (Lead) and the TARGET which is the destination entity (Opportunity) and select the fields to be mapped.  NOTE: This must match “type” (e.g. Text to text)

4-fieldmapping

Choose OK to save, and then publish.  The mapping is now established.

5-fieldmapping

Things to Note:

  • Field types must match.
  • Data will ONLY BE COPIED FROM SOURCE TO TARGET when you create the one record from the other, in this case when you convert the Lead record.  If you update this field in the Opportunity record, it WILL NOT update the Lead record.  In this case the Lead record will be set to closed, but if reopened, updating that field in the Lead WILL NOT update the Opportunity.  There are other methods (Quick View Forms, Workflows, etc) that can do this.
  • Careful when mapping text fields of different lengths, going smaller to larger (50 characters to 100 characters) is OK

If you have not used field mappings before, they are definitely useful, especially when data needs to “travel” across entities.

I hope this helped!

Cheers
Nick

One thought on “Dynamics 365 Entity Field Mappings Explained

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s