Is there a way to differ between regular Lookup field to a MasterDetail field?

When calling to getDescribe() on a field both of them holds the type of REFERENCE.


After further investigation, Is it possible that the field is_updateable is false on master detail but true on regular lookup?

  • 3
    is_updateable can be true on master-detail if the "allow reparenting" option is specified on the field.
    – sfdcfox
    Commented Feb 28, 2018 at 16:13
  • great point @sfdcfox! learned something new
    – RedDevil
    Commented Feb 28, 2018 at 18:09

1 Answer 1


You want to call getRelationshipOrder() from your describe. It will be null for a lookup, 0 or 1 for a Master-Detail relationship.

You must log in to answer this question.

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