Activity Forums Salesforce® Discussions What happen if child have two master records and one is deleted?

  • Prachi

    Member
    August 9, 2018 at 9:08 am

    Hello Avnish,

    If child have two master records and one is deleted then the record is deleted and placed in the recycle bin.

    Junction object records are deleted when either associated master record is deleted and placed in the Recycle Bin. If both associated master records are deleted, the junction object record is deleted permanently and cant be restored.

    Thanks.

  • Avnish Yadav

    Member
    August 16, 2018 at 6:48 am

    Thanks, Prachi.

  • shariq

    Member
    September 16, 2018 at 5:42 pm

    Hi,

    Few important points (usually interview  type Questions of salesforce ):

    One Object can have only two Master-Detail relationships.
    If we delete record A (First Master detail relationship is always primary)  – then child record c will be deleted.
    If we delete record B then in this case also child record C will be deleted.
    If we delete record c then only C will be deleted , master record will not be deleted.
    If child C has two Master record A and B, Where A is primary relation then Child record C will inherit the look and feel of Parent object A.

    Hope this helps.

  • Parul

    Member
    September 21, 2018 at 10:04 pm

    Hi

    If parent record is deleted then child is also deleted in Master-detail.

  • Tejas

    Member
    January 6, 2022 at 3:00 am

    <div>In case of MDR when i delete the child the child record is visible in recycle bin, can u plz elaborate what the below explanation means??</div>If the record is a child or detail in a master-detail relationship and the parent record is deleted, the child record is also soft deleted but cannot be viewed in the recycle bin.

  • CRMJetty

    Member
    February 14, 2022 at 10:34 am

Log In to reply.

Popular Salesforce Blogs