Microsoft Dynamics® CRM Training
Creating Field Mappings between Entities
An error occurred while loading the video. Please try again.
Creating Field Mappings between Entities
Hi, and welcome to the xRM.com CRM Success Portal.
In Microsoft Dynamics CRM Online 2011, you can configure mappings between fields within a relationship. But what exactly does this mean?
Let's say you are looking at a Contact and you create a new Invoice for that particular Contact record, CRM Online can automatically grab the address information from the Contact and populate the appropriate fields of the Invoice, thus saving you time and energy.
This happens for many entity relationships out of the box, but this feature can be configured by the user as well.
In this walkthrough, we'll see how Field Mappings work by creating a new Contact from an Account record. Then, we'll walk through the process of creating a custom mapping relationship between a Contact and Account record.
Let's begin with a default sample Account record called "Designer Goods (sample)", which I opened from Accounts in the Workplace module. Since we're mapping a relationship between an Account record and a Contact record, let's click on Contacts here in the left navigation pane of the Account form.
Here we are presented with a view of Contacts associated with the Designer Goods Account. To see how Field Mappings work, let's click on Add New Contact in the ribbon.
We are now presented with a new Contact form. Take notice of some of the fields that are already filled out for us. Thanks to Field Mappings in CRM Online, certain fields have already been populated for us with information pulled from the Parent Account record, Designer Goods. This saves us the time of having to refer back to the Account record to manually fill in these fields.
However, notice that the populated fields are not locked, or "grayed out." This means that if we want to associate a different address with this Contact, we are free to do so. Field Mapping in CRM Online is time saving, and does not limit our options.
Now let's dive into system customizations to see how Field Mappings work and create our own Field Mapping.
Note that this task requires a Security Role of System Administrator or System Customizer, or equivalent privileges.
Close the new Contact record and the Account record without saving. Go to the Settings module, and click Customizations in the left navigation pane. From there we'll click Customize the System. The Solution window opens for the Default Solution.
Next we drill down into the Account entity by clicking on the arrow next to Entities, and then the one next to Account. Now we'll click on 1:N Relationships, meaning one-to-many relationships. In other words, a 1:N relationship between the Account and Contact entities allows one Account record to be related to many Contact records.
Since we're mapping a relationship between an Account record and a Contact record, let's scroll down and find Contact in the Related Entity column. Here is the relationship we're looking for, contact_customer_accounts, so we'll double click it.
This opens the Relationship: Account to Contact window. Here we can see the general information behind the relationship, but let's click on Mappings in the left.
Remember the fields that were automatically populated when we created a new Contact in the Designer Goods Account? Well these are the Field Mappings that made it possible. Here we can add and remove Field Mappings, so let's create our own by clicking New.
This opens the Create Field Mapping From Account to Contact dialog. Notice that on the left we have a list of Source Entity Fields (from the Account entity), and on the right we have the Target Entity Fields (of the Contact entity). Let's create a Field Mapping for the E-mail field of the Account entity.
In the Source Entity Fields list, we'll select emailaddress1. (Technical note: Fields have two names. The "logical" name shown in the Name column, is an internal name that never changes. The Display Name appears next to the field on the forms that most users see and can be changed to suit the language of the users or for other reasons. The field with the display name of E-mail has a logical name of emailaddress1.) Now in the Target Entity Fields list, we'll select the same. However if we wanted to populate a different field with an Account e-mail address, we'd identify that here. Now click OK.
The dialog closes and we should see our new Field Mapping back here in the Relationship: Account to Contact window. Everything checks out, so we'll click Save and Close.
Now let's test out our new Field Mapping by opening an Account record once again and then creating a new Contact.
And there you have it. The e-mail address has been pulled from the Account record and inserted in the proper field in the new Contact record.
Thanks for watching.