An administrator at a corporate event planning company needs to configure a relationship between the standard Account object and a custom object named Vendor_Contract__c. The business requirement states that deleting an Account record must automatically delete all associated Vendor_Contract__c records. In addition, management requires a roll-up summary field on the Account object to summarize total contract values. Which relationship configuration should the administrator implement?
- Create a Master-Detail relationship on Vendor_Contract__c with Account as the master object.Answer
- BCreate a Lookup relationship on Vendor_Contract__c to Account and configure a standard roll-up summary field on Account.
- CCreate a Master-Detail relationship on Account with Vendor_Contract__c as the master object to protect detail records from deletion.
- DCreate a Lookup relationship on Vendor_Contract__c and use Dynamic Forms component visibility to handle record deletion and summaries.
Answer
Create a Master-Detail relationship on Vendor_Contract__c with Account as the master object.
Creating a Master-Detail relationship on the child object (Vendor_Contract__c) with Account as the master fulfills both business requirements. In a Master-Detail relationship, deleting a master record automatically deletes all associated detail records, and master objects support standard roll-up summary fields to aggregate detail record values.
Step-by-Step Solution
Key Concept
Master-Detail Relationship Capabilities and Limitations