Cert++
Close

Master-detail deletion, ownership, and sharing

Key Takeaway

In a master-detail relationship, the master record controls its detail records. Deleting the master record deletes its detail records, and the detail records take their owner, security, and sharing from the master record.

A master-detail relationship links a detail (child) object so tightly to its master (parent) object that the master record controls the detail record. The master record decides what happens on delete and undelete, who owns the detail record, and who can see and edit it. A lookup relationship is a similar but looser link.

How the master record controls its detail records

In a master-detail relationship, the master record controls certain behaviors of its detail records. The master object can be a standard object, such as Account or Opportunity, or it can be a custom object.

The master record's control can extend to subdetail records, which sit one level further down. For example, imagine three objects in a chain: Account, then Expense Report, then Expense Line Item. An Account record is the master of its Expense Report records, and each Expense Report record is the master of its Expense Line Item records. The Expense Line Item records are subdetail records, so the Account record's control can reach them too.

The master-detail relationship field is required on the page layout of detail and subdetail records, so users must choose a master record when they create a detail record.

By default, you can't reparent a detail record to a different master record. For master-detail relationships on custom objects, an admin can allow reparenting by selecting the "Allow reparenting" option in the relationship definition.

Platform Administrator Study Guide

Checklist progress

0/324Learned

Describe the standard object architecture and relationship model (for example: standard object, parent/child, master detail/lookup/junction relationships, record types, Schema Builder)

0/14

Prepare for the Exam

Play Today's Certle

Study Community

Ask questions and get the latest info from other Platform Administrator studiers. 757 members and growing.