Microsoft Power Platform Developer Exam: PL-400 Relationship Behavior Types

One-to-Many Relationship Behavior Types in Dataverse Database

Question

You create a one-to-many relationship between records in table A and table B in the Dataverse database.

Please select all correct statements about the relationship's behavior.

You need to set the behavior type to…

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Correct Answers: A, B and D

Dataverse defines the two types of relationships between tables: One-to-Many (1:N) and Many-to-Many (N:N)

A one-to-Many relationship is a Parent-Child relationship, like between a person and multiple email addresses.

One person can have multiple email addresses.

The person record is related to the multiple records in the Email table from the Person table point.

It is a One-to-Many relationship for a person record.

For the related email record, this relation is Many-to-One.

When you create such a relationship between tables, the Dataverse automatically adds a Lookup column in a child or related table.

For Many-to-One or One-to-Many relationships, you need to instruct the Dataverse what to do when you delete the records from the parent table.

This instruction is called a behavior.

There are three advanced options for relationship behavior: Referential - this type preserves the child records from the actions on the parent records.

It has two options: Remove Link and Restrict.

If you use a Remove Link option, you preserve the child records when a parent record is deleted.

If you use a Restrict option, you prevent the deletion of the parent records related to child records, and you cannot delete the parent record without deleting all child records first.

Parental - this type defines the child records' deletion when you delete the parent record.

It does not prevent the deletion of the parent record when the related records exist.

Custom - this type provides a configuration for each cascade type of action.

Option A is correct because the Parental type defines the child records' deletion when you delete the parent record.

It does not prevent the deletion of the parent record when the related records exist.

Option B is correct because Custom Cascade All defines the child records' deletion when you delete the parent record.

This behavior is the same as the Parental type.

It does not prevent the deletion of the parent record when the related records exist.

Option D is correct because the Referential Remove Link type defines the parent record's deletion without deleting any related child records.

It does not prevent the deletion of the parent record when the related records exist.

Option C is incorrect because the Referential Restrict prevents the parent record's deletion before deleting the child records.

This behavior type does not help you if you want to set the parent record owner to be the owner of the child records.

You need to use the Custom Cascade User Owner settings.

For more information about Dataverse table relationship behavior, please visit the below URLs:

Sure, I'd be happy to help!

When you create a one-to-many relationship between records in table A and table B in the Dataverse database, you need to specify the behavior type for the relationship. The behavior type determines what happens when you perform certain actions on the parent or child records in the relationship.

Here are the correct statements about the relationship's behavior, based on the options provided:

A. Parental if you do not want to create "orphan" records in table B when you delete a parent row in table A When you set the behavior type to Parental, it means that the child records in table B are dependent on the parent record in table A. If you try to delete a parent record that has child records associated with it, you will get an error message unless you delete the child records first. This prevents "orphan" records in table B, which are child records that no longer have a corresponding parent record in table A.

B. Custom Delete Cascade All if you want to delete all child rows in table B when you delete a parent row in table A When you set the behavior type to Custom Delete Cascade All, it means that when you delete a parent record in table A, all the child records in table B that are associated with the parent record will also be deleted. This is useful when you want to ensure that all related data is deleted when a parent record is deleted.

C. Referential Restrict if you want to set the owner of the parent record to be the owner of the child records When you set the behavior type to Referential Restrict, it means that the owner of the child records in table B will always be the same as the owner of the parent record in table A. This is useful when you want to restrict access to child records based on the owner of the parent record.

D. Referential Remove Link if you want to delete a parent row in table A without deleting child rows in table B When you set the behavior type to Referential Remove Link, it means that when you delete a parent record in table A, the association between the parent record and the child records in table B will be removed, but the child records themselves will not be deleted. This is useful when you want to maintain the child records in table B for reference purposes, but you no longer need to associate them with the parent record in table A.

I hope this explanation helps you understand the different behavior types for one-to-many relationships in the Dataverse database!