Lookup versus master-detail field conversion
Key Takeaway
To convert a lookup relationship to master-detail, every record must already have a value in the lookup field. To convert a master-detail relationship to a lookup, the master object can't have any roll-up summary fields.
A relationship field links records on one object to records on another. The two main kinds are lookup and master-detail. You can switch an existing custom relationship field from lookup to master-detail, or from master-detail to lookup, without rebuilding it. Each direction has a condition that can block it. Each direction also automatically changes how records on the detail side are shared.
How to convert a relationship field
You need the "Customize Application" permission to change custom fields. With that permission, you convert a relationship field from the object's settings:
- Open the object's management settings, and go to "Fields".
- Click "Edit" next to the custom field.
- Click "Change Field Type".
- Select the new type, and click "Next".
- Save.
In an org with many records, Salesforce shows a waiting page after you request a lookup to master-detail conversion, or the reverse. Field type changes run in the background. If your request is queued, you get an email when the change completes. The conversion can fail if a very large number of records is affected.