This task requires the System Administrator or System Customizer security role A defined set of privileges. The security role assigned to a user determines which tasks the user can perform and which parts of the user interface the user can view. All users must be assigned at least one security role in order to access the system. or equivalent permissions. Customization tasks can be performed only while you are online. More information: Customization Permissions
1:N (one-to-many) relationships represent relationships viewed from the primary entity The entity that a related entity is associated to. Sometimes called a parent entity.. The same relationships can be viewed as N:1 (many-to-one) relationships from the related entity An entity that is associated with a primary entity (record type) through a unique reference defined by using a lookup control on the related entity form. For example, an account has a unique reference to a primary contact.. More information: Understanding Hierarchical Entity Relationships
In the default solution This refers to all the components of the standard Microsoft Dynamics CRM software, plus any customizations your organization has added to it. The solution can only be customized by a system administrator or system customizer, or someone with equivalent privileges., you can create new relationships or edit existing ones for all entities that allow customization.
In a managed solution A complete solution that has been packaged. A managed solution has partial or full restrictions on customizing solution components. Package and export a solution as a managed solution to control customizing solution components when installed into another organization. While a managed solution may allow customizing one or more components, you cannot add or remove a component. This differs from an unmanaged solution, where you can add or remove components., you cannot create new relationships or edit existing relationships for entities. However, if the managed properties Managed properties control which customization tasks can be performed on a solution component. When you create new solution components, you can choose what level of customization you will allow for each. Managed properties are set for a solution component while the solution is unmanaged. The managed properties take effect only after the solution is packaged (exported) as a managed solution and installed in another organization. for an entity in the managed solution are set to allow customization, you can add or edit relationships to that entity in the Customization area of Microsoft Dynamics CRM.
In an unmanaged solution For those with a required security role, an unmanaged solution has no restrictions on adding, deleting, updating, testing, importing, or exporting solution components. A solution is developed as an unmanaged solution. This differs from a managed solution, where you cannot add or remove components., you can create new relationships or edit existing relationships for all entities that allow customization.
In the Navigation Pane, click Settings.
Under Customization, click Customizations.
In the Customization area, click Customize the System.
Under Components, expand Entities, and then expand the entity you want.
Under the entity, click 1:N Relationships.
To edit a relationship or view the details for a relationship, select the relationship, and on the Actions toolbar, click Actions, and then click Edit.
- OR -
To add a new relationship, click the New 1-to-Many Relationship button.
For a new relationship, in the Relationship Definition section, select the Related Entity. A default Name value will be added after you select the Related Entity. You can accept this name or enter a new one.
Note
If you change theRelated Entity before you save, the value of the Name field will not change. Make sure that this value is meaningful before you save.
In the Lookup Field section, for a new relationship, enter information in the following fields:
Display Name The name that is displayed in the relationship list for both entities.
Name The name that is used in the Microsoft Dynamics CRM database schema for the relationship.
In the Requirement Level list, you can choose one of the following options:
No Constraint The field will not require data in order to save a record.
Business Required A requirement level used for fields that must be filled in before a record can be saved. Required fields are marked with an asterisk.
Business Recommended A requirement level used for fields that should be filled in, but don't have to be, in order to save the record. Recommended fields are marked with plus symbols.
In the Navigation Pane Item for Primary Entity section, in the Display Option list, you can choose one of the following options:
Use Plural Name This will use the plural name of the current entity for the associated view.
Use Custom Label Enter a custom label in the Custom Label field.
Do Not Display An associated view will not be displayed.
When the Use Plural Name or Use Custom Label options are selected you can choose from the Display Area field to specify where the relationship label will be displayed on the form. You can also specify the Display Order to control where the label will be included within the selected display area. The range of allowed numbers begins with 10,000. Relationships with a lower Display Order value will appear above other relationships with a higher value.
In the Relationship Behavior section, for new relationships and for existing relationships with Type of Behavior set to Parental, you can choose the type of relationship.
What happens when you take an action on this entity is defined by the type of relationship. For Parental, Referential, and Referential, Restrict Delete, the specific behaviors are determined by the relationship type. For Configurable Cascading, you must select the behavior you want for each possible action.
In the Type of Behavior list you can choose one of the following relationship types:
Parental In a parental relationship between two entities, any action taken on a record of the parent entity is also taken on any child entity records that are related to the parent entity record. For example, if you delete a record in the parent entity, the related child entity records are also deleted; or if you share a parent entity record, the related records from the child entity are also shared.
Referential In a referential relationship between two entities, you can navigate to any related records, but actions taken on one will not affect the other.
Referential, Restrict Delete In a referential, restrict delete relationship between two entities, you can navigate to any related records. Actions taken on the parent record will not be applied to the child record, but the parent record cannot be deleted while the child record exists. However, you cannot delete a record when related records exist.
Configurable Cascading Any action taken on a parent entity record can also be applied to any child entity records that are related to the parent entity record. You can define the behavior for each type of action. For example, you can set it up so that if you share a record in the parent entity, any related records for the child entity are not automatically shared. But if you delete a parent entity record, any related child entity records are automatically deleted.
If you selected the Configurable Cascading relationship type, for each of the six actions listed below, you can select the behavior for the action.
If you set all the behaviors for the actions to match the behaviors for the actions for the other relationship types, when you save the relationship, the type of behavior is automatically set to the other type. For example, if you set all the actions to Cascade All, the relationship type is changed from Configurable Cascading to Parental.
Assign The related records will be assigned to the same user.
Share The related entity records will also be shared with the same user or team.
Unshare The related entity records will no longer be shared with the same user or team.
Reparent If the owner of the primary entity record changes because the primary entity record was reparented, the owner of any related records will be set to the same owner as the primary entity record.
Delete The related records can be deleted, unlinked from the primary entity record, or the delete action can be canceled.
Merge The related records associated with the subordinate record will be reparented to the master record.
Cascade User-Owned Apply to related records if they are owned by the same owner as the owner of the parent record.
Remove Link Remove the link to the related record, without modifying the related record.
Click Save and Close to close the Relationship form.
When your customizations are complete, publish them:
To publish customizations for only the component that you are currently editing, on the Home tab, in the Save group, click Publish.
To publish customizations for all unpublished components at one time, click Publish All Customizations.
Notes
A custom entity cannot be the primary entity in a relationship with a related system entity that cascades. This means you cannot have a relationship with any action set to Cascade All, Cascade Active, or Cascade User-Owned between a primary custom entity and a related system entity.
No new relationship can have any action set to Cascade All, Cascade Active, or Cascade User-Owned if the related entity in that relationship already exists as a related entity in another relationship that has any action set to Cascade All, Cascade Active, or Cascade User-Owned. This avoids relationships that create a multi-parent relationship.
Any time you change user interface elements or implement form scripts for an entity, you must publish changes to apply them. Any customizations that change the data schema of Microsoft Dynamics CRM such as custom entities, relationships, or fields are applied immediately.
If the relationship is managed, and the Customizable column is set to False, you cannot edit relationships. If it is set to True, you can edit relationships. If the relationship is unmanaged then these values do not apply, and you can edit the relationship.