Activity Forums Salesforce® Discussions Can we change already existing lookup relationship between 2 objects to master detail relationship?

  • Can we change already existing lookup relationship between 2 objects to master detail relationship?

    Posted by Avnish Yadav on September 3, 2018 at 1:56 pm

    Can we change already existing lookup relationship between 2 objects to master detail relationship?

    Parul replied 6 years, 3 months ago 4 Members · 3 Replies
  • 3 Replies
  • Prachi

    Member
    September 3, 2018 at 2:04 pm

    Hi Avnish,

    System will allow changing relationship to master-detail only if all child records have value specified for parent as in master detail relationship, master is required.
    If any of the child value doesn’t have parent value (means look up field is blank), then system will give validation error while changing the data type.
    So if it is required to change relationship, them populate all blank values with some parent value and then change it to master detail.

    Thanks.

  • shariq

    Member
    September 12, 2018 at 12:22 am

    Hi Avinish,

    Lets get it simple, Master Detail is required relationship so that means every record created will have some value in its master detail field. For changing lookup into master detail, the records must have values in its lookup field.

    Hope this helps.

  • Parul

    Member
    September 12, 2018 at 4:47 am

    Hi Avnish

    You can convert a master-detail relationship to a lookup relationship as long as no roll-up summary fields exist on the master object. You can convert a lookup relationship to a master-detail relationship, but only if the lookup field in all records contains a value.

     

    Thanks

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos