function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
CvrKCvrK 

what happens to the detail record when either of the primary or secondary master record is deleted?

Hi,
usually when master record is deleted detail(child) record will be deleted,but wondering,what happens to the detail record when either of the primary or secondary master record is deleted?,will child record be deleted or not?
Best Answer chosen by CvrK
KaranrajKaranraj
Hope you are asking in the junction object scenario, if you answer is Yes the child record will get deleted automatically.

All Answers

KaranrajKaranraj
Hope you are asking in the junction object scenario, if you answer is Yes the child record will get deleted automatically.
This was selected as the best answer
William TranWilliam Tran
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.

Lookup relationship does not auto-delete any record when the parent or child is deleted.

As a common practice, if your question is answered, please choose 1 best answer. 
But you can give every answer a thumb up if that answer is helpful to you. 

Thanks
CvrKCvrK
Thanks karanraj, i am referring to Junction object and lastly, is there any way that we can make the child record available for one relationship while a master record is deleted from another relationship.
William TranWilliam Tran
You can make it a lookup relationship instead of the Master Detail relationship.

Thx.
CvrKCvrK
thanks william, righ after posting my question, i found the answer and the points that you have listed in the below link

http://www.jitendrazaa.com/blog/salesforce/deep-drive-in-junction-object-create-many-to-many-relationship-in-salesforce/
salesforcetssalesforcets
Will delete triggers of the child record also get triggered under this scenario?