Understanding Hierarchical Entity Relationships

Hierarchical entity relationships require that one of the records have a field to store a unique identifier that references another record. The record that stores the reference to another record is called the child record. The record referenced by the unique identifier in the child record is called the parent record.

A hierarchical relationship allows each child record to store a reference to one parent record. A parent record can be referenced by an unlimited number of child records. The parent record can display all the child records in an associated view.

Defining Relationships

Relationships are defined between entities. The entity that will represent the child records is called the related entity. A relationship attribute, also known as a lookup attribute, is created on the related entity to allow records to store a reference to a parent record. The entity that represents the parent records is called the primary entity in the relationship.

A N:1 Relationship is created or viewed from the related entity. Many records from the related entity can reference any one record from the primary entity.

Data Integrity

A hierarchical relationship introduces the opportunity to define rules for data integrity. For example, an opportunity record has no meaning if it isn't associated with a customer record. Microsoft Dynamics CRM requires that an opportunity record be related to a customer record. However, a task activity can be meaningful whether it is associated to another record or not. Relating a task activity to another record is optional.

When you create a relationship, you must choose whether to enforce rules for data integrity. If you make the relationship field on the related entity required by setting a requirement level of Business Required, you can guarantee that each of the related entity records created through the Microsoft Dynamics CRM application will be related to a record of the parent entity.

Relationship Behavior

Once you create a hierarchical relationship, you can control how the relationship behaves to support data integrity and business rules for your organization. The relationship can control how actions performed on a parent record cascades down to a child record.

You can configure the relationship behavior for the following actions performed on the primary entity record:

Choose from three predefined and commonly used types of behavior, or choose to configure the cascading action performed on the record of the primary entity.

The three predefined types of behavior are:

Also choose to define specific cascading behavior for each of the actions. For most actions, your choices are:

Data integrity must be preserved when data in records changes or when the status of records change. Deleting a parent record breaks the data integrity of any child record if the relationship is required. There are three ways to address this:

If the relationship is not required, it is sufficient to remove the data that establishes the link to the deleted parent record.

In addition to data integrity, your business can apply relationship behavior when data in records change or when the status of records change. The relationship behavior can cascade this action so it does not need to be done manually.

Limitations for Hierarchical Relationships

Mapping

Users can create new child records in an associated view. When this happens, data from the parent record is copied into the form for the new child record. By default, a reference to the parent record is always copied to the relationship lookup field in the child record. You can choose whether data from other fields should be copied at the same time. More information: Mapping Entity Attributes

Related Topics

Entity Relationships

Mapping Entity Fields

Did you find the information that you need?
Yes      No 
If not, what information do you need? (optional)