Salesforce Platform Developer I (legacy) — Question 174

When viewing a Quote, the sales representative wants to easily see how many discounted items are included in the Quote Line Items.
What should a developer do to meet this requirement?

Answer options

Correct answer: C

Explanation

The correct answer is C because a roll-up summary field can directly aggregate data from related records, in this case, allowing for a sum of discounted items. Option A is incorrect since triggers do not provide a straightforward way to display aggregated data. Option B does not aggregate data effectively and relies on a Workflow Rule, which is less efficient for this scenario. Option D, while it calculates a sum, does not have the same efficiency and direct relationship as a roll-up summary field.