Question

Difficulty: Very hardStandard and Custom Object Management

An administrator at a healthcare organization needs to display the total aggregate score of all related child custom object records, Patient_Feedback__c, on the standard Contact object. The business requirements state that if a Contact record is deleted, the associated Patient_Feedback__c records must be retained in the system for auditing purposes. When trying to create a native Roll-Up Summary field on the Contact object, the administrator notices that Patient_Feedback__c is not available in the summarize object dropdown list. Which explanation accounts for this limitation, and what is the recommended declarative solution?

  1. Native Roll-Up Summary fields require a Master-Detail relationship. To preserve child records upon Contact deletion, the administrator must keep the Lookup relationship and use a Record-Triggered Flow to aggregate and update the total score on the Contact record.Answer
  2. B
    Native Roll-Up Summary fields require a Master-Detail relationship. The administrator should convert the Lookup relationship to a Master-Detail relationship, as child records in a Master-Detail relationship are automatically preserved when a parent record is deleted.
  3. C
    Native Roll-Up Summary fields can be created on Lookup relationships, provided the Lookup field is configured as Required on the page layout and Field-Level Security is granted to all profiles.
  4. D
    Native Roll-Up Summary fields on standard objects are restricted unless a custom Record Type is created on the Contact object and assigned to the default picklist value set.

Answer

Native Roll-Up Summary fields require a Master-Detail relationship. To preserve child records upon Contact deletion, the administrator must keep the Lookup relationship and use a Record-Triggered Flow to aggregate and update the total score on the Contact record.
Native Salesforce Roll-Up Summary fields are exclusively supported on the master side of a Master-Detail relationship. However, deleting a master record cascades to delete all child detail records. To meet the requirement of preserving child records when a Contact is deleted, the relationship must remain a Lookup relationship. A declarative Record-Triggered Flow can be used to aggregate field values from the lookup child records and update a custom field on the Contact object.

Step-by-Step Solution

1
Analyze relationship capabilities for roll-up functionality
Standard declarative Roll-Up Summary fields on a parent object are only supported when a Master-Detail relationship exists between the parent and child objects.
Because the objects are linked via a Lookup relationship, the child object does not appear in the Roll-Up Summary wizard.
2
Evaluate deletion cascade behavior
Converting the Lookup to a Master-Detail relationship causes detail records to be permanently deleted when the master record is deleted.
The requirement states that Patient_Feedback__c records must be retained when a Contact is deleted, ruling out a Master-Detail conversion.
3
Determine the optimal declarative solution
Maintain the Lookup relationship and implement a Record-Triggered Flow on Patient_Feedback__c to recalculate the aggregate score on the parent Contact record upon creation, update, or deletion.
This achieves real-time data aggregation without introducing cascade deletion behavior.

Key Concept

Standard and Custom Object Relationship Capabilities and Deletion Behaviors
Rate this question