DEX-403 practice question 18 of 35

Northern Trail Outfitters (NTO) has created the custom objects Trail and Park in Salesforce to track trails and parks respectively. NTO wants to track the total number of trails a park has on the park record without writing any code. Which two actions should an app builder take to accomplish this requirement? Choose 2 answers

Full set: 291 questions
Answer options
A: Use a formula field on the Park record to show the total number of trails.
B: Use a roll-up summary field on the Park record to show the total number of Trails. Correct answer
C: Use a master-detail relationship between the Park and Trail objects. Correct answer
D: Use a lookup relationship between the Park and Trail objects.
Correct Answer:
B. Use a roll-up summary field on the Park record to show the total number of Trails.; C. Use a master-detail relationship between the Park and Trail objects.
Explanation

To declaratively count child records (Trail) on a parent record (Park), a roll-up summary field is the required tool. This field type is specifically designed to aggregate data (e.g., COUNT, SUM, MIN, MAX) from related detail records. However, a critical prerequisite for creating a roll-up summary field is that the two objects must be linked by a master-detail relationship. Therefore, the app builder must first create a master-detail relationship with Park as the master and Trail as the detail, and then create the roll-up summary field on the Park object.

Why Incorrect

A. Use a formula field on the Park record to show the total number of trails. Formula fields cannot aggregate data or count records from child objects. They compute values based on fields within the same record or parent records.
D. Use a lookup relationship between the Park and Trail objects. Roll-up summary fields are not available for objects connected by a lookup relationship. This type of aggregation would require code (like an Apex Trigger or a complex Flow).

References

1. Salesforce Help Documentation, "Roll-Up Summary Field": "You can create a roll-up summary field to display a value in a master record based on the values of fields in a detail record. The detail record must be related to the master through a master-detail relationship." This directly confirms that both a roll-up summary field (B) and a master-detail relationship (C) are necessary.

2. Salesforce Trailhead, "Data Modeling" Module, "Understand Object Relationships" Unit: Under the "Master-Detail" section, it states that this relationship type allows you to "Create roll-up summary fields on the master object to summarize the detail records." This explicitly links the two required components.

3. Salesforce Developer Documentation, "Object Relationships Overview": In the comparison table for relationship types, the feature "Roll-up summary fields can be created on the parent" is listed as available for "Master-Detail" but "N/A" for "Lookup," confirming that option D is incorrect.

Scroll to Top