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?
- Create a Master-Detail relationship field on Deployment_Task__c referencing Software_Release__c.Answer
- BCreate a Lookup relationship field on Deployment_Task__c referencing Software_Release__c and create a Roll-Up Summary field on Software_Release__c.
- CCreate a Lookup relationship field on Deployment_Task__c with cascade delete enabled and use a formula field on Software_Release__c.
- DCreate 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
Key Concept
Master-Detail Relationship Capabilities and Roll-Up Summaries