Converting master-detail relationships to lookups
Key Takeaway
You can't convert master-detail to lookup while the master object has roll-up summary fields, so delete them first. You can't convert lookup to master-detail while any record has a null value in the lookup field, so populate those values first.
A master-detail relationship field on a detail object can be changed into a lookup relationship field. The reverse conversion, lookup to master-detail, is also possible. Each direction has its own blocker, and you must clear it before you convert. The conversion also resets the detail object's org-wide default, so it changes sharing as well as structure.
How to convert master-detail to lookup
Salesforce allows the conversion only if no roll-up summary fields exist on the master object. Roll-up summary fields block the conversion because they depend on master-detail. The detail records behind a roll-up summary field must be related to the master through a master-detail relationship. So after you create a roll-up summary field, you can't convert the master-detail relationship into a lookup.
- Check the master object for roll-up summary fields.
- Delete each roll-up summary field you find, because the conversion requires that none exist on the master object.
- Change the master-detail relationship field on the detail object to a lookup relationship field.
Priya's org has two custom objects: Conference and Session. Session has a master-detail relationship field to Conference, so Conference is the master. Conference has a roll-up summary field called "Total Seats" that adds up the seats on its Session records. Priya wants to change the Session field to a lookup. Salesforce doesn't allow the conversion while "Total Seats" exists on Conference. Priya deletes "Total Seats" first. With no roll-up summary fields left on Conference, she converts the Session field to a lookup.