Question

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

A Salesforce Administrator is designing a custom data structure for a real estate company to track properties and maintenance requests. The business requirements state that every Maintenance Ticket record (`Maintenance_Ticket__c`) must be linked to a parent Property record (`Property__c`). If a Property record is deleted, all associated Maintenance Ticket records must be automatically deleted from the system. Furthermore, the administrator needs to display the total calculated cost of all maintenance requests directly on the parent Property record. Which relationship configuration should the administrator implement to meet these requirements?

  1. Create a Master-Detail relationship field on Maintenance_Ticket__c pointing to Property__c, and create a Roll-Up Summary field on Property__c.Answer
  2. B
    Create a Lookup relationship field on Maintenance_Ticket__c pointing to Property__c, and create a Roll-Up Summary field on Property__c.
  3. C
    Create a Master-Detail relationship field on Property__c pointing to Maintenance_Ticket__c, and create a Roll-Up Summary field on Maintenance_Ticket__c.
  4. D
    Create a Lookup relationship field on Maintenance_Ticket__c pointing to Property__c, and use a standard cross-object formula field on Property__c to aggregate total costs.

Answer

Create a Master-Detail relationship field on Maintenance_Ticket__c pointing to Property__c, and create a Roll-Up Summary field on Property__c.
Defining a Master-Detail relationship field on the child object (`Maintenance_Ticket__c`) linking to the parent object (`Property__c`) ensures that deleting a property record cascades deletion to all associated tickets. Additionally, it allows the creation of a declarative Roll-Up Summary field on `Property__c` to sum the total repair costs of related tickets.

Step-by-Step Solution

1
Analyze relationship deletion requirements
Cascade deletion requires a Master-Detail relationship where Property__c is the Master and Maintenance_Ticket__c is the Detail.
Deleting a master record automatically deletes associated detail records in a Master-Detail relationship, whereas Lookup relationships do not cascade delete by default in this manner.
2
Analyze aggregation requirements
Displaying total maintenance costs on the parent object requires a Roll-Up Summary field using the SUM function on Property__c.
Native declarative Roll-Up Summary fields are exclusively available on the master object in a Master-Detail relationship.
3
Determine field placement
Place the Master-Detail relationship custom field on the child object (Maintenance_Ticket__c).
In Salesforce data modeling, foreign key relationship fields (Lookup and Master-Detail) are always created on the child object pointing to the parent object.

Key Concept

Master-Detail Relationships and Roll-Up Summary Capabilities
Rate this question