Salesforce Platform Developer I (legacy) — Question 212
Requirements state that a child record is deleted when its parent is deleted, and a child can be moved to a different parent when necessary.
Which type of relationship should be built between the parent and child objects in Schema builder to support these requirements?
Answer options
- A. Master-Detail relationship
- B. Child relationship
- C. Lookup relationship from the parent to the child
- D. Lookup relationship from the child to the parent
Correct answer: A
Explanation
The Master-Detail relationship allows for the cascading deletion of child records when the parent is deleted, which meets the requirement. The other options, such as Lookup relationships, do not support this cascading deletion feature and thus would not fulfill the requirement of deleting the child record along with the parent.