Converting Between Lookup and Master-Detail
In Salesforce, relationships between objects are either Lookup (loosely coupled) or Master-Detail (tightly coupled, with ownership, security, and cascade delete inherited from the parent). As a Platform Administrator II candidate, you need to understand both how and when to convert between these types. Converting Lookup to Master-Detail: This is possible only if every existing record on the child object has a value in the lookup field. Because a Master-Detail field is required by definition, Salesforce will block the conversion if any record has a blank parent value. You must first populate the field on all records (via Data Loader, mass update, or deleting orphaned records). Additional constraints: the child object cannot already have two master-detail relationships (limit is two per object), the child cannot be the master in another relationship that would create an invalid chain beyond the allowed depth, and the parent object cannot be a standard object acting as detail. Once converted, the child record inherits sharing and ownership from the parent, the Owner field is removed from the child, and roll-up summary fields become available on the parent. Converting Master-Detail to Lookup: This is generally straightforward, provided the parent object has no roll-up summary fields referencing that child relationship. Roll-up summaries must be deleted first. After conversion, child records gain their own Owner field (populated with the parent record owner by default), sharing becomes independent, and the field becomes optional. Cascade delete no longer applies unless explicitly enabled by Salesforce Support for lookups. Key exam considerations: data must be clean before converting to Master-Detail; roll-ups block conversion to Lookup; sharing model changes significantly; and conversions can affect reports, page layouts, and automation that depend on ownership. Always test in a sandbox and communicate impacts to stakeholders before performing conversions in production.
Converting Between Lookup and Master-Detail Relationships: A Complete Guide for the Salesforce Advanced Administrator Exam
Relationship design is one of the most consequential decisions an administrator makes when building a data model. Choosing between a lookup and a master-detail relationship affects security, sharing, deletion behavior, reporting, and the ability to use roll-up summary fields. Because business requirements change over time, administrators frequently need to convert an existing relationship from one type to the other. The Salesforce Advanced Administrator exam tests this area within the Advanced Objects and Applications section because it requires a deep understanding of data integrity rules, the prerequisites for conversion, and the downstream consequences of changing a relationship type. Getting this wrong in a real org can lock you out of the conversion or cause data loss, so the exam expects you to know the rules precisely.
What It Is: Lookup vs. Master-Detail Recap
A lookup relationship loosely links two objects. The child record can exist without a parent, the field can be optional or required, the child has its own sharing settings and Owner field, and deleting the parent can be configured to clear the lookup, prevent deletion, or (if enabled by Salesforce Support) cascade delete.
A master-detail relationship tightly couples two objects. The detail (child) record cannot exist without a master, the relationship field is always required, the detail inherits security and sharing from the master, the detail record has no Owner field, deleting the master cascade-deletes all detail records, and roll-up summary fields can be created on the master to aggregate detail data. A custom object can have up to two master-detail relationships, enabling many-to-many designs through a junction object.
Converting between these two types means editing the existing custom relationship field and changing its data type from Lookup to Master-Detail or from Master-Detail to Lookup. The field keeps its API name and existing data, but the behavior of the relationship changes to match the new type.
How It Works: Converting Lookup to Master-Detail
You convert by navigating to the child object's field definition in Object Manager, clicking Change Field Type, and selecting Master-Detail. Salesforce enforces several strict prerequisites before it allows the conversion:
1. Every child record must have a value in the lookup field. Because a master-detail field is always required, no detail record can be orphaned. If any existing records have a blank lookup value, the conversion is blocked. You must populate or delete those records first, typically using Data Loader, a list view with inline editing, or a report to identify the blanks.
2. The child object cannot already have two master-detail relationships. The two-relationship limit applies.
3. The lookup must point to a custom object or a supported standard object. Standard objects cannot be on the detail side of a master-detail relationship, so you cannot convert a lookup on a standard object (for example, a custom lookup field on Contact) into a master-detail field. The child must be a custom object.
4. Field-level details must be compatible. If the child object has an Owner-based sharing model with manual shares or sharing rules that rely on the child's Owner field, those will be removed because the detail inherits sharing from the master once converted. The Owner field disappears from the detail object.
Once converted, you gain roll-up summary fields, cascade delete, and inherited sharing. The sharing setting (Sharing Setting on the relationship field) lets you specify whether users need Read or Read/Write access on the master to create, edit, or delete detail records.
How It Works: Converting Master-Detail to Lookup
The reverse conversion is also performed through Change Field Type, but it has its own constraint:
1. No roll-up summary fields may exist on the master object that reference the detail. Roll-up summaries depend entirely on the master-detail structure. You must delete all roll-up summary fields that summarize the detail object before Salesforce permits the conversion. This is the single most commonly tested rule.
2. The relationship cannot be the only master-detail on a junction object that other features depend on. Review any dependencies such as validation rules, formulas, or Flows referencing roll-ups.
After conversion, the detail object becomes a standalone object with its own Owner field (populated with the user who performs the conversion or the record creator, depending on context), its own organization-wide default, and the ability to have sharing rules. The field becomes optional unless you mark it required. Cascade delete is disabled; the default delete behavior becomes "Clear the value of this field." You lose the ability to use the relationship for roll-up summaries until you convert back.
Additional Behavioral Considerations
- Reparenting: In a master-detail relationship, the "Allow reparenting" checkbox controls whether a detail record can be moved to a different master. This is not an issue in lookups, where the value can always be changed.
- Standard-to-standard relationships such as Account to Contact are built-in and cannot be converted or created by administrators.
- Field history, validation rules, and formulas referencing the relationship field generally continue to work because the API name is unchanged, but formulas that cross-reference parent fields should be tested after conversion.
- Record ownership change after converting to lookup is a visible side effect: users may suddenly see records they could not see before, or lose access, because sharing switches from inherited to independent.
Exam Tips: Answering Questions on Converting Between Lookup and Master-Detail
1. Memorize the two blocking conditions. Lookup to master-detail is blocked when any child record has a blank lookup value. Master-detail to lookup is blocked when roll-up summary fields exist on the master. If a scenario describes a conversion failing, one of these two reasons is almost always the answer.
2. Watch for the standard object trap. If a question involves a lookup field on a standard object (Account, Contact, Opportunity, Case) that the admin wants to convert to master-detail, the correct answer is that it cannot be done because standard objects cannot be the detail side.
3. Count the master-detail relationships. If the child object already has two master-detail relationships, a third cannot be created through conversion. Questions about junction objects often hinge on this limit.
4. Connect the conversion to the business requirement. If a scenario says the business needs totals, counts, or sums of child data displayed on the parent, the solution is converting to master-detail so roll-up summaries become available. If the scenario says child records must survive when the parent is deleted or must have independent ownership and sharing, the solution is converting to (or keeping) a lookup.
5. Remember what you lose. Converting master-detail to lookup removes cascade delete and inherited sharing and adds an Owner field. Converting lookup to master-detail removes the Owner field, removes child-level sharing rules, and forces the field to be required. Questions may ask about the "impact" of a conversion rather than the prerequisites.
6. Recognize the preparatory steps. Exam answers often involve a sequence: first run a report to find blank values, populate them with Data Loader, then change the field type. Or first delete roll-up summary fields, then change the field type. Choose answers that address the prerequisite before the conversion.
7. Eliminate distractors. Options suggesting you must delete and recreate the field, contact Salesforce Support, or create a new object are usually wrong when a direct conversion is possible. Conversely, if the scenario makes conversion impossible (standard object as child, three relationships needed), an alternative design such as a lookup with custom automation is the correct choice.
8. Know the sharing setting options. After converting to master-detail, the Sharing Setting determines whether users need Read Only or Read/Write access to the master to modify detail records. A question may test this configuration as part of the post-conversion setup.
Summary
Converting between lookup and master-detail is a powerful but constrained operation. To convert lookup to master-detail, every child record must reference a parent, the child must be a custom object, and the two-relationship limit must not be exceeded. To convert master-detail to lookup, all roll-up summary fields on the master must be removed first. Understand the consequences for sharing, ownership, deletion behavior, and roll-up summaries, and you will be able to confidently answer any exam scenario on this topic.
Admin II - Converting Between Lookup and Master-Detail Example Questions
Test your knowledge of Converting Between Lookup and Master-Detail
Question 1
When a master-detail relationship on a custom object is converted to a lookup relationship, what happens to the organization-wide default sharing setting of the former detail object?
Question 2
Universal Containers relates a custom Service Visit object to Account through a lookup field. Leadership wants each Account to show the total cost of its visits. Service Visit has a Private org-wide default. Each visit is owned by the technician who performed it, and technicians must keep seeing only their own visits. Some visits are logged before an account is known. A consultant proposes converting the lookup to master-detail so a roll-up summary field can be used. What should the administrator recommend?
Question 3
Universal Containers tracks Inspection records with a lookup field to a custom Site object. Managers now want a roll-up summary on Site that counts its inspections. The administrator edits the field to change its type to master-detail, but Salesforce blocks the change. A report shows that several hundred older Inspection records have no Site value. What should the administrator do to complete the change?