Master-Detail Relationships create a tight parent-child binding — child inherits parent's sharing, child requires the parent (deletion cascades), parent enables Roll-Up Summary fields. Use when child records have no meaning without the parent (e.g., Order Line Items don't exist without an Order). One-way decision: converting to/from Master-Detail loses data.
- Open Setup → Object Manager → child object → Fields & Relationships → New
Master-Detail is created on the child.
- Pick Master-Detail Relationship as the field type
Different from Lookup. Locked behavior.
- Pick the Related To object
The parent / master object.
- Set Field Label and Field Name
Label and API name.
- Configure Sharing Setting
Read/Write — child users with Edit on master can edit child. Read Only — child users with Read on master can view child but can't edit.
- Configure Allow Reparenting (optional)
When ON, the lookup can be changed to a different parent later. When OFF (default), the master is locked once set — adds data integrity but limits flexibility.
- Save
Field is created. Now child records require a parent.
- (Optional) Add Roll-Up Summary fields on the parent
Master-Detail unlocks Roll-Up — go to the master object and add COUNT / SUM / MIN / MAX rollups against this child.
Required.
Required. Locked after Save.
Required. Read/Write or Read Only.
- Master-Detail child records require a parent — cannot exist without one. Trying to create a child via API without setting the parent ID fails.
- Deleting a master cascades to ALL its detail records. Test cascade deletes carefully — there's no undo. Salesforce's Recycle Bin holds for 15 days.
- Converting Lookup to Master-Detail (or vice versa) requires data alignment. Lookup with NULL values can't convert to Master-Detail without first populating the lookup. Plan migrations carefully.