This documentation is archived and is not being maintained.

Entity and Attribute Mapping

banner art

[Applies to: Microsoft Dynamics CRM 4.0]

Find the latest SDK documentation: CRM 2015 SDK

Mapping streamlines data entry when a user creates new records that are associated with another record. When an entity has a relationship with another entity, you can create new related entity records from the associated view visible on the primary entity. When the user creates a new record from an associated view, mapped data from the primary entity record is copied to the form for the new related entity record. You control what data is copied by adding new mappings in the relationship between the two entities. If a record is created any way other than from the associated view of the primary entity, data is not mapped. Notice that if there are multiple relationships between the same pair of entities, there is only one entity map. This map will have to be used for mapping fields for both relationships.

For example, you might want to set up a mapping between the address fields in accounts and the address fields in contacts so that when a user adds a contact associated with a specific account, the address fields for the contact are filled in automatically.

You can map one attribute to multiple target attributes. For example, you can map address information in an account to both the billing and shipping addresses in an order.

Mapping only applies just before a new record is created from an associated view. A user can make changes the record is saved, and changes that are made later to the data in the primary record are not applied to the related record.

After you create a relationship, you can use the AutoMapEntity message to generate a mapping. It maps all the attributes between the two related entities where the attribute names are identical and the types are identical. This might result in some mappings that are not desirable. Therefore, you should always check the resulting mapping before you publish the customization.

The following illustration shows the entity relationships for this area. For more information, see Key to Entity Diagrams.

Entity map and attribute map entity model

See Also



© 2010 Microsoft Corporation. All rights reserved.