+ Start a Discussion
Muhammad WasimMuhammad Wasim 

Master-Detail Relationship

Hi Guys

I want to understand a concept. I have 4 custom objects.

  1.  Position
  2.  Candidate
  3.  Job_Application
  4.  Review

The Job_Application object has two master-detail relationships. One is related to Position and the other is related to Candidate. Now if I want to create another master-detail relationship in the Job_Application object. Framework will not allow me to do that, because we have limit of two master-detail relationships per object.

I'm trying to create a master-detail relationship in the Review object with the master Job_Application and the detail Review object. But when I choose master-detail relationship type and go to the next page to relate it with an object(master). I do not find Job_Application object in that related to list. Why? Is it possible to create a master-detail relationship with such an object which is already detail of two objects? It could be the master of another object? I think it should be possible but don't know what is the reason behind that I'm unable to see the Job_Application object in related to list. Please guide.

Thanks.

Best Answer chosen by Muhammad Wasim
AshlekhAshlekh
Hi.

a) First you can't create more then two masterdetail relationship.The object which have tow M-D relationship called junction object.
b) You cann't create a object as a master of other object(detail) which is already junction object. Reason is below

Supoose there is 4 object A,B,C, and D,

C is juction object which having two master object A and B, Now you want C should be master of D object,

As we know if master record will delete than child also will deleted.

What happen If C is a master of D and you will delete record of A. 

All Answers

AshlekhAshlekh
Hi.

a) First you can't create more then two masterdetail relationship.The object which have tow M-D relationship called junction object.
b) You cann't create a object as a master of other object(detail) which is already junction object. Reason is below

Supoose there is 4 object A,B,C, and D,

C is juction object which having two master object A and B, Now you want C should be master of D object,

As we know if master record will delete than child also will deleted.

What happen If C is a master of D and you will delete record of A. 

This was selected as the best answer
Martin PongratzMartin Pongratz
Hi,

ran into the problem today as well. I don't see a problem with the scenario pointed out by Ashlekh as it's logical for me that you delete D & C if you delete one of the records A or B. Is there any real technical limitation in 2018?

Thanks.