Question

Difficulty: MediumObject Relationships (Lookup, Master-Detail, Many-to-Many)

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?

  1. Create a Master-Detail relationship on Inspection Routine referencing Equipment, and create a Roll-Up Summary field on Equipment to aggregate completed routines.Answer
  2. B
    Create a Lookup relationship on Inspection Routine referencing Equipment, and create a Roll-Up Summary field on Equipment to aggregate completed routines.
  3. C
    Create a Lookup relationship on Inspection Routine referencing Equipment, and select the option to clear the lookup field value if the equipment record is deleted.
  4. D
    Create 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.

Answer

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.

Step-by-Step Solution

1
Analyze deletion and parentage requirements
Since deleting an Equipment record must cascade and delete all associated Inspection Routine records, a Master-Detail relationship is required.
Lookup relationships do not support native cascade deletion of child records in standard custom object configurations without additional automation.
2
Evaluate aggregation requirement
A Roll-Up Summary field on Equipment will count or calculate child Inspection Routine data natively.
Roll-Up Summary fields are exclusively available on the master object in a Master-Detail relationship.

Key Concept

Master-Detail Relationship Capabilities and Roll-Up Summary Fields
Rate this question