Activity Forums Salesforce® Discussions Can not create master detail relationship on a custom object in Salesforce

  • Can not create master detail relationship on a custom object in Salesforce

  • Kumar

    Member
    December 7, 2016 at 5:48 am

    Hello everyone,

    I can not create a master detail relationship on a custom object, it shows the following error:

    You cannot create a new Master-Detail relationship on an existing custom object if records already exist. You must first create a Lookup relationship, populate the lookup field with data in all records, and then change the relationship type to Master-Detail.

    Anyone with suggestions? Thanks

  • Shekhar Gadewar

    Member
    December 7, 2016 at 12:07 pm

    Hi Kumar,

     

    If records are present in the objects,

    then you can not create Master Details relationship.

     

    However,

    you can create Lookup relationship between then,

    connect all records and then convert the "field" to Master Details relationship

  • Kumar

    Member
    December 7, 2016 at 12:09 pm

    Thanks !!

     

     

  • shariq

    Member
    July 24, 2017 at 1:45 pm

    Hi Kumar,

    As we know in Master Detail relationship parent is compulsory, but records which are already created doesn't
    have a parent, so you can only create a lookup relationship and then convert it to Master Detail.

    Hope this helps.

Viewing 1 - 4 of 4 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos