Salesforce Platform Developer I (legacy) — Question 104

A developer has the following requirements:
* Calculate the total amount on an Order.
* Calculate the line amount for each Line Item based on quantity selected and price.
* Move Line Items to a different Order if a Line Item is not in stock.
Which relationship implementation supports these requirements?

Answer options

Correct answer: D

Explanation

The correct answer is D because a Master-Detail relationship allows for the re-parenting of Line Items to different Orders, which is crucial when items are out of stock. Options A and B do not provide sufficient control over the relationship dynamics necessary for transferring items, while option C does not allow for re-parenting, making it unsuitable for this scenario.