Microsoft Dynamics 365 Relationships
Entity relationships: Entity relationships define how records can be related to each other in the database.
Entity relationships or Connections?
Entity relationships are metadata that make changes to the database. These relationships allow for queries to retrieve related data very efficiently. Entity relationships are used to define formal relationships that define the entity or that most records can use whereas connections are less formal kind of relationships.
Types of entity relationships:
1. 1: N (One-to-Many): An entity relationship where one entity record for the primary entity can be associated to many other related entity records.
2. N: N (Many-to-Many): An entity relationship that depends on a special relationship entity, sometimes called an intersect entity, so that many records of one entity can be related to many records of another entity.
Create relationships:
Step 1: Navigate to Solution Explorer.
Step 2: Select the entity for which relationship is to be set.
Step 3: Expand the entity and select the type of relationship.
Step 4: In the Relationship Definition section, in the related entity list, select the entity to be related.
Step 5: Select whether this will be searchable to not.
Step 6: In the Lookup Field section, specify a value for the Display Name field.
Step 7: In the Field Requirement list, choose an option to specify data requirements whether it is optional, recommended or required.
Step 8: In the Navigation Pane Item for primary entity section, select the display option, display area, custom label and display order.
Step 9: In the Relationship Behavior section, in the type of behavior list, choose one of the following options:
1. 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.
2. Referential: In a referential relationship between two entities, navigation to any related records is possible, but actions taken on one will not affect the other.
3. Referential, Restrict Delete: Similar to referential the only difference is that when child record or any related record exists for a parent record it cannot be deleted.
4. Configurable Cascading: In a configurable cascading relationship between two entities, behavior is selected associated with each of a set of possible actions.
Step 10: Save the changes and close the relationship form.
Step 11: After completion of customizations publish them.
Possible Relationship Behaviors:
Cascade Active: Perform the action on all active related entity records.
Cascade All: Perform the action on all related entity records.
Cascade None: Do nothing.
Cascade User Owned: Remove the value of the lookup field for all related entity records.
Remove Link: Prevent the primary entity record from being deleted when related records exist.
Restrict Delete: Perform the action on all related entity records owned by the same user as the primary entity record.

Like
Report
*This post is locked for comments