A Salesforce Administrator at a manufacturing company is designing a custom data model to link Equipment (`Equipment__c`) with Inspection Routines (`Inspection_Routine__c`). Each inspection routine MUST be associated with a single equipment record, and deleting an equipment record must automatically remove all of its associated inspection routines. Additionally, executives require a live count of all completed inspection routines displayed directly on the equipment record page without using custom code. Which data model architecture should the administrator implement to meet these requirements?
- Create a Master-Detail relationship on Inspection Routine referencing Equipment, and create a Roll-Up Summary field on Equipment to aggregate completed routines.Cevap
- BCreate a Lookup relationship on Inspection Routine referencing Equipment, and create a Roll-Up Summary field on Equipment to aggregate completed routines.
- CCreate a Lookup relationship on Inspection Routine referencing Equipment, and select the option to clear the lookup field value if the equipment record is deleted.
- DCreate a Master-Detail relationship on Inspection Routine referencing Equipment, but set the relationship field as optional to allow child records to persist after parent deletion.
Cevap
The administrator should create a Master-Detail relationship on Inspection Routine referencing Equipment and add a Roll-Up Summary field on Equipment to aggregate the completed routines.
Creating a Master-Detail relationship field on the Inspection Routine child object satisfies both business requirements: deleting an Equipment record automatically cascades deletion to all related Inspection Routine records, and it allows the creation of a standard Roll-Up Summary field on the Equipment master object to aggregate completed routines.
Adım Adım Çözüm
Anahtar Kavram
Master-Detail Relationship Capabilities and Roll-Up Summary Fields