Study for the Salesforce App Builder Exam. Challenge yourself with interactive questions and get detailed feedback. Boost your confidence and ace your exam!

Practice this question and more.


What type of relationship field must exist before creating a roll-up summary field on a custom object?

  1. A lookup relationship field on the parent object.

  2. A lookup relationship field on the child object.

  3. A master-detail relationship field on the parent object.

  4. A master-detail relationship field on the child object.

The correct answer is: A master-detail relationship field on the child object.

To create a roll-up summary field on a custom object, a master-detail relationship field must be established on the parent object. This relationship defines a direct link between the parent and child records, ensuring that the roll-up summary field can aggregate data from the child records that are directly associated with a single parent record. In this scenario, the master-detail relationship allows for the automatic summarization of the child record values (such as COUNT, SUM, MIN, MAX) at the parent level. This is a critical aspect of roll-up summary fields because they rely on the hierarchical relationship to function properly, allowing the parent to compute values based on related child records. Other relationship types, such as lookup relationships, do not support the creation of roll-up summary fields since they do not establish the same level of dependency and ownership required for direct data aggregation. With a master-detail relationship, if the parent record is deleted, all associated child records are also deleted, reinforcing the strong tie that roll-up summary fields rely upon.