Activity › Forums › Salesforce® Discussions › What happen if child have two master records and one is deleted?
Tagged: Child Record, Delete, Junction Object, Master Record, Recycle Bin
-
What happen if child have two master records and one is deleted?
Posted by Avnish Yadav on August 9, 2018 at 8:03 AMWhat happens if the child has two master records and one is deleted?
CRMJetty replied 4 years, 2 months ago 6 Members · 6 Replies -
6 Replies
-
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.
- [adinserter block='9']
-
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.
-
Hi
If parent record is deleted then child is also deleted in Master-detail.
-
<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.
-
Hello,
Refer to this link:
https://developer.salesforce.com/forums/?id=906F0000000BUQPIA4
https://help.salesforce.com/s/articleView?id=sf.relationships_considerations.htm&type=5
Hope this helps you.
Thanks.”
Log In to reply.