Question
You are a Dynamics 365 Finance developer. You have two tables as shown in the following exhibit:
| Parent | Relationship | Child |
|---|---|---|
| Table1 | 1:n | Table2 |
You need to configure Table1 to ensure that records cannot be deleted from Table1 if Table2 contains related records.
Which value should you use for the OnDelete property?
- A. None
- B. Cascade
- C. Cascade + Restricted
- D. Restricted Correct
Explanation
A delete action of Restricted prevents a parent record from being deleted while related child records exist, which is exactly the requirement. None deletes the parent without checking children, Cascade deletes the related child records along with the parent, and Cascade + Restricted cascades when the delete comes from another cascade but otherwise behaves as restricted, which is more than the requirement asks for.