I've got a Master-Detail relationship on a custom object where the parent is the Account object. There are no roll-up summary fields on the Account object, and there are no formula fields on the custom object referencing the relationship.

For some reason I still don't see the option to change the field back to a look-up relationship — there's nothing in the documentation to suggest that I need to do anything with the data (unlike having null values when going the other way) so I'm wondering whether any code references to the field will stop the button from appearing or not.

I could dump the data in the field using DataLoader and try to delete it to find out, but I'm wondering if anybody knows what controls the Change Type buttons visibility?

3 Answers 3


Turns out I'd overlooked something: there was a deleted roll-up summary still in the deleted fields section of the Account object.

Deleting that allowed me to change the field's type without modifying code and without deleting the field or losing data.

  • Hi @LaceySnr. Is this the same if I need to convert a Lookup relationship to a Master-Detail if it's referenced in code? I need a MD relation in place of an existing Lookup and thinking about the side effects for the same. One is that that field become mandatory if convertd to MD.
    – MnZ
    Sep 29, 2014 at 11:46
  • To be entirely honest I can't remember, but I don't think it is. That said, code that doesn't populate the relationship and tries to insert detail relationships will fail like you suggest.
    – Matt Lacey
    Sep 29, 2014 at 23:18
  • 2
    In case anyone else is still having a problem after checking the above, I wanted to also mention to make sure that any field updates for workflow rules are not updating the master record.
    – Jenny B
    Jun 29, 2015 at 17:47
  • Further to the Workflow rule note, the Field Update must be DELETED, not just deactivated. That is 20 minutes I will never get back.
    – JodieM
    Jul 6, 2019 at 8:31

The field which you want to convert master detail to lookup is used in some rollup summary. First, you have to delete those fields, then automatically change field type button is enabled.


Converting Relationships

  1. You can convert a master-detail relationship to a lookup relationship as long as no roll-up summary fields exist on the master object. Please see the LINK for all details 

  2. You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.


  • 1
    Note that if you use 1. instead if 1) , the list actually gets formatted.
    – Adrian Larson
    Oct 27, 2017 at 13:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .