nerdexam
Salesforce

PDI · Question #141

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…

The correct answer is A. Line Item has a re-parentable master-detail field to Order. To support rollup summaries on an Order and allow Line Items to be re-parented between Orders, a re-parentable master-detail relationship where Line Item is the child of Order is required.

Submitted by manish99· Apr 18, 2026Data Modeling and Management

Question

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 on its own7

Options

  • ALine Item has a re-parentable master-detail field to Order.
  • BOrder has a re-parentable master-detail field to Line Item.
  • CLine Item has a re-parentable lookup field to Order.
  • DOrder has a re-parentable lookup field to Line Item.

How the community answered

(45 responses)
  • A
    76% (34)
  • B
    2% (1)
  • C
    16% (7)
  • D
    7% (3)

Why each option

To support rollup summaries on an Order and allow Line Items to be re-parented between Orders, a re-parentable master-detail relationship where Line Item is the child of Order is required.

ALine Item has a re-parentable master-detail field to Order.Correct

A master-detail relationship with Line Item as the child and Order as the master allows for rollup summary fields on the Order object, and making the master-detail field re-parentable enables moving Line Items between different Orders.

BOrder has a re-parentable master-detail field to Line Item.

A master-detail relationship where Order is the child of Line Item is inverse and prevents rollup summaries on the Order object from its Line Items, and would not allow re-parenting Line Items to different Orders.

CLine Item has a re-parentable lookup field to Order.

A lookup relationship does not support rollup summary fields, which are necessary for calculating the total amount on an Order from its Line Items.

DOrder has a re-parentable lookup field to Line Item.

A lookup relationship does not support rollup summary fields on the parent object, making it unsuitable for calculating the total amount on an Order based on its Line Items.

Concept tested: Salesforce master-detail relationships

Source: https://help.salesforce.com/s/articleView?id=sf.overview_of_custom_object_relationships.htm&type=5

Topics

#Master-Detail Relationship#Roll-up Summary#Reparenting#Data Modeling

Community Discussion

No community discussion yet for this question.

Full PDI Practice