About Relationships :)

Relationships establish a connection between records. In Dynamics 365, entities can modeled to have either a one-to-many or many-to-many relationship with another entity.

A one-to-many relationship (1:N) is a hierarchical, in which a record from one entity can have one and only one parent record from another entity. The parent record, on the other hand, can have many records associated to it. The country of birth of a person can be an example. My country of birth of is the Philippines alone — I could not have been born in two (or more) locations! On the other end of the relationship, the Philippines is the country of birth of many other Filipinos.

1 to N

For a many-to-many relationship (N:N), there is no hierarchy. A record from one entity can have many other records on another entity related to it; the converse of the relationship is also true. A simple example of which would be a teacher handling college courses — a teacher could be teaching Algebra, Trigonometry; Algebra could be handled by many other teachers.

N to N

There are two ways of creating a N:N relationship in Dynamics 365: (1) native way and (2) manual way. The native way is to create an N:N relationship between the two entities straightaway. The manual way is to create a custom entity and establish a 1:N relationship to the two other entities intended for N:N relationship. When the relationship is created the native way, there is a hidden intersect entity that is also created, but something that cannot be customized (e.g. include other fields). The manual way offers the advantage of being able to add more attributes to the middle entity, which otherwise is not possible with the other method.

Manual N to N

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s