Question

Difficulty: MediumObject Relationships (Lookup, Master-Detail, Many-to-Many)

A Salesforce Administrator is designing a custom data model to track software releases using a custom object named Software_Release__c and individual deployment tasks using a custom object named Deployment_Task__c. The business requirement states that deleting a Software_Release__c record must automatically delete all associated Deployment_Task__c records. Additionally, management requires a real-time aggregate calculation of total deployment hours directly on the Software_Release__c record. Which relationship configuration should the administrator implement on the Deployment_Task__c object to meet these requirements?

  1. Create a Master-Detail relationship field on Deployment_Task__c referencing Software_Release__c.Answer
  2. B
    Create a Lookup relationship field on Deployment_Task__c referencing Software_Release__c and create a Roll-Up Summary field on Software_Release__c.
  3. C
    Create a Lookup relationship field on Deployment_Task__c with cascade delete enabled and use a formula field on Software_Release__c.
  4. D
    Create a Many-to-Many junction object linking Software_Release__c and Deployment_Task__c with two separate Lookup fields.

Answer

Create a Master-Detail relationship field on the Deployment_Task__c object referencing the Software_Release__c object.
Establishing a Master-Detail relationship on the child custom object (Deployment_Task__c) that references the parent (Software_Release__c) satisfies both business criteria. It automatically cascades deletions from master to detail records and unlocks the ability to build declarative Roll-Up Summary fields on the master object to sum total deployment hours.

Step-by-Step Solution

1
Analyze deletion requirements
Master-Detail relationships natively enforce cascading deletion, ensuring child Deployment_Task__c records are removed when the parent Software_Release__c record is deleted.
Lookup relationships retain child records by default when a parent record is deleted unless specific Apex or custom logic is implemented.
2
Analyze aggregation requirements
Roll-Up Summary fields can be created on the master object (Software_Release__c) to calculate sums, counts, or min/max values of fields on the detail records.
Declarative Roll-Up Summary fields are exclusively available on the master side of a Master-Detail relationship.

Key Concept

Master-Detail Relationship Capabilities and Roll-Up Summaries
Rate this question