To manage your organization's processes in Microsoft Dynamics CRM, you'll need to create relationships between the entities it manages during those processes. Using Microsoft Dynamics CRM 2011, you can create two different types of supported entity relationships. Types of entity relationships Using the customization features of Microsoft Dynamics CRM 2011, we can define two types of entity relationships:
Unsupported relationship types there are two types of entity relationships that are not supported by Microsoft Dynamics CRM 2011:
1:N relationships In a 1:N relationship, a primary record can be associated with zero or more related records, and the related records can be associated with one primary record. N:1 relationships We create a custom 1:N relationship in Microsoft Dynamics CRM 2011 from the primary entity by specifying the related entity type. We can also create a custom N:1 relationship from the related entity by specifying the primary entity type. So, the 1:N and N:1 are created from a different starting point, but are otherwise the same. We can also create custom N:1 relationships by creating a lookup field on a related entity. For example, in Microsoft Dynamics CRM 2011, an account can have many contacts associated with it. Each contact can have a parent account. From the point of view of the account, this is 1:N relationship with contacts, and from the point of view of the contact, this is a N:1 relationship with accounts. Relationship behaviors When you carry out certain actions on a primary record, the related record may also be affected depending on the defined relationship behavior between the two entities. The important actions are as follows:
All other actions - such as activating and deactivating the primary record - have no effect on any related records. There are four relationship behaviors types as follows:
There are some rules and restrictions on entity relationships in Microsoft Dynamics CRM 2011:
N:N relationships
In an N:N relationships, a record of one entity can be associated with zero or more records of a second entity, and records of the second entity can be associated with zero or more records of the first entity.
Native and manual N:N relationship types
When an N:N relationship exists between two entities, an intersection entity stores the identifiers of each related record.
Self-referential relationships
A self-referential relationship is a relationship between an entity and itself. There are two types of self-referential relationships:
Self-referential 1:N relationships
Self-referential 1:N relationships are useful for representing the hierarchical associations between the records, for example, a master order with related sub-orders.
Self-referential 1:N relationships can have a parental relationship behavior. If the relationship behavior is parental, any assign, share/unshare, reparent, delete, or merge action applied to the parent record will also be applied to all its child records.
A self-referential relationship cannot be used to create either direct or indirect circular relationships where the primary record is related to itself or any record in its own hierarchy.
To create a self-referential 1:N relationship, follow the procedure to create 1:N relationship and specify the primary entity to be the same entity as the related entity.
Self-referential N:N relationships
Self-referential N:N relationships are useful for representing the loose associations between records, for example, cases linked to other cases where the root cause of all cases is the same.
Mappings
Entity relationships field mappings reduce the data entry required when new records are created from within the context of a primary record.
For example, when you create a new contact from the Associated Contacts view on Account form, some of the data from the account – such as address and phone numbers – is copied to similar fields on the new contact record. Mappings in the account-to-contact entity relationship make this possible.
Field values from the primary record are only copied to the related record when the related record is initially created. If the fields in the primary record are later modified, the changes are not copied to the related records.
Requirements for Mapping
Some requirements must be met before two fields can be mapped:
Carsten Siemens edited Original. Comment: Pirated Content - see my comment
NOTE: This article was reported as Pirated/Plagiarized Content (content you didn't write) and will be removed. Please do not steal content from others. If you feel we are mistaken, please leave a comment or email tnwiki at Microsoft with a link to this article and with clear and detailed reasons why you own the content or have explicit permission from the author.
Content was taken from: "Book - Microsoft Dynamics CRM 2011 - Customization & Configuration ... - Chapter 5"
Published by Neil Benson (Packt Publishing)
my.safaribooksonline.com/.../ch05_html