A property management firm has two unrelated custom objects, Inspection__c and Building__c. About three inspections are logged per building each year. Deleting a building must automatically delete its inspections, and each inspection must use the same sharing and access as its building. How should the Platform App Builder relate the objects?
- Add a required lookup relationship field on Building__c that points to Inspection__c.
- Add a master-detail relationship field on Building__c that points to Inspection__c.
- Add a required lookup relationship field on Inspection__c that points to Building__c.
- Add a master-detail relationship field on Inspection__c that points to Building__c.
Show answer
Answer: D
Why: Both requirements, cascade delete and inherited sharing, are built-in behaviors of master-detail relationships. The relationship field is always created on the detail (child) object. Inspection is the 'many' side, so the master-detail field goes on Inspection__c and points to Building__c. Deleting a building then removes its inspections, and inspections follow the building's access. Reference: Object Relationships Overview