Study for the Salesforce Platform Developer Exam. Study with flashcards and multiple choice questions, each question has hints and explanations. Get ready for your exam!

Practice this question and more.


What field type will you use to compute total amounts and total prices per Opportunity using Rollup summary fields?

  1. Crossobject

  2. Lookup

  3. Master-Detail

  4. Junction

The correct answer is: Master-Detail

Rollup summary fields are specifically designed to perform calculations on records related to a master-detail relationship. In Salesforce, this type of field allows you to aggregate data from detail records, such as calculating totals or averages based on specific criteria related to the master record. In the context of opportunities, a rollup summary field can be used to compute total amounts and total prices by summarizing the values of related child records, such as opportunity line items, which are tied to the opportunity through a master-detail relationship. This ensures that when a child record is created, updated, or deleted, the rollup summary field on the master record reflects the changes automatically. The other field types do not support rollup summary fields. For instance, a lookup relationship does not enforce the same ownership and sharing rules as a master-detail relationship and does not allow for rollup summary fields. Additionally, a cross-object field option does not exist in the context of rollups, and a junction is typically used to represent many-to-many relationships rather than for creating rollup calculations. Thus, the correct choice is the master-detail relationship, which is the foundation required for implementing rollup summary fields effectively.