0

I want to create a master detail relation ship on my contact. But instead of master detail i am able to see External Lookup Relationship. what is the use of External Lookup Relationship, and where is master detail Lookup Relationship option. Now how can we create master detail Lookup Relationship.

1
  • We need more details to answer your question authoritatively - what is the other object you're trying to link the Contact object with? Is Contact the parent or child?
    – Rob
    Aug 10, 2015 at 7:43

1 Answer 1

0

Without know what object you're linking Contact with and which is the parent or child, there are a couple of possible reasons:

  1. Standard objects (such as Contact) can only be the Master in a Master-Object relationship. If you want to create such a relationship, you need to do it on the child (custom) object.

  2. Per the official documentation, Salesforce will not accommodate a master-detail relationship to a custom object that already contains data:

This is because creating a master detail relationship adds a new required field to the custom object (known as a "foreign key" to database administrators). Each data record in the object needs to have a valid value in the field -- it cannot be left blank.

A possible workaround is to delete the data in your custom object, and then add the master-detail relationship.

If you don't want to lose all of your existing data, another approach is as follows:

  1. Create a Lookup relationship instead of a Master-Detail relationship. This adds the new "foreign key" field to the custom object, but it is not required to have a value for each data record. Do NOT make the Lookup "required".

  2. Add a valid value in the lookup (foreign key) field of each data record in the custom object. (You may need to create a custom tab to facilitate this data entry.)

  3. Edit the object relationship and change the relationship type from Lookup to Master-Detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.