Skip main navigation

Relationships Overview

.Microsoft Dynamics 365 and the Power Platform
17.1
Many times you may need to create relationships between common data service entities to allow the ability to associate different record types together. Just like things are related in real life, real life concepts and objects have relationships between them. For example, you may go to the store that has many shelves. Each shelf allocated to one or more product categories with multiple instances of the same product under each category and type. You might also have a shopping basket that can contain one or more instances of the selected products. The scenarios are reflected in business requirements where you might have a customer that has one or more sales ordered.
54.9
Each order would have one or more lines describing details of the order and link to a product from a catalogue. These business requirements can now be implementing common data services using various relationship types and capabilities. One-to-many relationships are the most common type of relationships found in common data service for apps. For example, one venue can hold multiple events or one company can have multiple employees. Each one-to-many relationship has the following characteristics. One record of a primary entity, zero, one, or many records of a related entity. The related entity has a lookup field to store a unique identifier of the primary entity, and N1 is not a separate type. It is a 1N relationship just viewed from the other side.
102
One-to-many entity relationships establish a hierarchy between records. With end-to-end or many-to-many relationship there is no explicit hierarchy. There are no lookup fields or behaviours to configure. Records created using this end-to-end relationship can be considered peers. And the relationship is reciprocal. For example, one event can have multiple attendees, contacts, and each contact can attend multiple events. It’s important to note that the hidden intersect entity that is created to manage this relationship is not something that we can have access to. It’s not something we can customise. You can have access to some of this underlying data, but not without code. Sometimes you need to relate records of the same type.
147.6
For example, a company might have subsidiary’s, employees report to their managers who then report to theirs, and so on. These relationships are called self-referential. When you define these relationships, it’s often useful to represent the data as hierarchical relationship. For example, like an organisation chart. Common data services for apps allows us to define self-referential relationships as a hierarchical and visualise them in model driven apps. Sometimes you need to create related records of the same type. For example, a company might have subsidiary’s, employees report to their managers who then report to their managers, and so on. These relationships are called self-referential. When you define these relationships, it’s often useful to represent the data as a hierarchical relationship.
193.8
For example, like a organisation chart, common data services for apps allows us to define a self-referential relationship as a hierarchy and visualise them in model driven apps. In most common scenarios, you can manage entity relationships using the Power Apps portal that gives you the ability to view, create, edit, and delete relationships between these entities, both system and custom. From this view here, we can add a new relationship, either the one-to-many or many-to-many. We can open an individual relationship here and modify its properties. We can delete any relationships that are no longer required. And we can philtre our relationships here to view only those that we’re interested in perhaps custom only or sister relationships.

In the previous step, we discovered the Calculated and Roll-Up Fields. Over the next few steps, we will uncover different aspects of Relationships within The Power Platform. Let’s start with an overview of Relationships.

Many times, you may need to create relationships between Common Data Service entities to allow the ability to associate different record types together.

Just like things are related in real life, real-life concepts and objects have relationships between them.

Join the discussion

Just like things are related in real life, real-life concepts and objects have relationships between them. Can you explain in your words how common data is used in different relationship types in a business setting?

Use the discussion area below to let us know your thoughts. Try to respond to at least one other post and once you’re happy with your contribution, click the Mark as complete button to check the Step off, then you can move to the next step which is Relationship Types 1N.

This article is from the free online

Dynamics 365: Using Power Platform Applications

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now