A Salesforce administrator at a renewable energy firm is creating a custom object named Solar Site Survey to track site evaluation records associated with customer accounts. The business requirement states that deleting an Account record must automatically delete all related Solar Site Survey records, and the team needs to create a roll-up summary field on the Account object to display the total count of surveys. Which relationship configuration should the administrator implement to meet these requirements?
- Create a Master-Detail relationship on the Solar Site Survey object, designating Account as the master object.Answer
- BCreate a Lookup relationship on the Solar Site Survey object, designating Account as the parent object.
- CCreate a Master-Detail relationship on the Account object, designating Solar Site Survey as the master object.
- DCreate a Lookup relationship on the Solar Site Survey object with cascade delete enabled, and create a roll-up summary field on Account.
Answer
Create a Master-Detail relationship on the Solar Site Survey object, designating Account as the master object.
In Salesforce, Master-Detail relationships provide automatic cascading deletion (deleting the master record deletes associated detail records) and allow native Roll-Up Summary fields to be created on the master object. A standard object such as Account can serve as the master object when a Master-Detail relationship field is created on a custom child object.
Step-by-Step Solution
Key Concept
Master-Detail vs. Lookup Relationships on Standard and Custom Objects