Yes — you can convert a Lookup relationship to Master-Detail, but only if a strict set of prerequisites are met. Conversion is also reversible: Master-Detail can be downgraded back to Lookup. This is one of the most useful schema-evolution tools in Salesforce — it’s how you start a relationship “loose” and tighten it once data is clean.
Prerequisites for Lookup → Master-Detail
Salesforce blocks the conversion unless every one of these is true:
- No null lookup values on child records. Every existing child record must have a populated value in the lookup field. If even one record has null, the conversion fails. You’ll need to backfill or delete those records first.
- The lookup field is not required to be left blank by any process. If a workflow, flow, or assignment rule sets the field to null, fix that first.
- The child object’s sharing rules referencing the lookup are reviewed. When you convert to master-detail, the child loses its own sharing model (becomes “Controlled by Parent”). Any sharing rules on the child object that distribute access independently will be removed or invalidated.
- The child object’s OwnerId-related logic is reviewed. The child loses its OwnerId field — anything that relied on it (queue assignment, owner formulas) must be remediated.
- The child has fewer than 2 existing master-details. An object can be the detail of at most 2 masters.
If all the above are true, the conversion succeeds via a checkbox toggle in the field’s edit screen.
How to do it (Setup steps)
- Verify zero nulls: run a report or SOQL
SELECT COUNT() FROM Child__c WHERE Parent__c = null. - Verify no sharing rule on child you need to preserve.
- Setup → Object Manager → [Child Object] → Fields & Relationships → [Your Lookup Field] → Edit.
- Change the field type from Lookup to Master-Detail.
- Salesforce runs a pre-conversion check. If anything’s wrong, you get a specific error pointing to the blocker.
- Save. The relationship is now master-detail; the child’s OWD is locked to “Controlled by Parent”; OwnerId is gone; cascade delete is on.
Reverse: Master-Detail → Lookup
This is also supported, but with its own prerequisite:
- All roll-up summary fields on the master that depend on this detail must be deleted first. Salesforce can’t keep a roll-up running once the relationship type loses cascade integrity.
After deleting those roll-ups, change the field type back to Lookup. The child object regains an OwnerId (set to the user who performs the conversion), regains its own OWD, and cascade delete is removed.
Practical pattern: “loose then tight”
The most common reason to convert is the “start with lookup, tighten later” pattern. You can’t create a Master-Detail on an object that already has data with nulls, so:
- Add the field as a Lookup.
- Backfill every existing record (data loader, flow).
- Run a verification report — confirm zero nulls.
- Convert to Master-Detail.
- Now you can create roll-up summaries on the master.
This is the recommended workflow when adding a child relationship to an existing populated object.
What changes for users after conversion to master-detail
| Aspect | Before (Lookup) | After (Master-Detail) |
|---|---|---|
| Child OwnerId | Yes | Removed |
| Child OWD | Independent | Controlled by Parent |
| Child sharing rules | Allowed | Removed / not allowed |
| Cascade delete | No (configurable) | Yes (automatic) |
| Roll-up summary on parent | Not possible | Possible |
| Field required | Optional setting | Always required |
Common errors and fixes
- “Some records do not have a value…” → backfill the lookup first
- “Object has existing sharing rules…” → delete or migrate the sharing rules
- “Object has roll-up summaries that depend on this field…” (reverse direction) → delete the roll-ups first
- “Cannot convert: object exceeds master-detail limit” → the child already has 2 master-detail fields, no third allowed
What doesn’t change
- The relationship name in SOQL (e.g.,
Parent__r.Field__c) stays the same - Reports, list views, formulas that reference the lookup keep working
- Existing data values (the parent Ids) are preserved
Bottom line
Lookup → Master-Detail conversion is a controlled, reversible operation that strengthens an existing relationship — provided every child has a parent and no sharing rules will be lost. Plan the backfill and sharing audit before flipping the switch.
Verified against: Salesforce Help — Convert Relationships. Last reviewed 2026-05-17.