+ Start a Discussion
Steve CairneySteve Cairney 

related master-detail object not an option

Hi, I'm creating a new custom object but I can't create a master-detail relationship to an existing custom object. Can anyone explain why this might be and if there's a workaround for this? I'll explain in detail below.

We have an existing custom object called Media Cost
Media Cost has the following master-detail relationships
1.Account
2. Opportunity

I want to create a new custom object called Production that has a master-detail relationship to the Media Cost object (because 1 Media Cost object can have many Production objects)

However, when I create a master-detail field, the Media Cost object isn't in the related drop down.

Have I hit a limitation within SF? If I have, is there any suggestions on how I get around this?

Thanks
Best Answer chosen by Steve Cairney
William TranWilliam Tran
Steve, you don't need the relationship to be MasterDetail, you can just create a normal lookup relationship.

MasterDetail is a special type of lookup relationship (like the child cannot exist without the parent, etc.), that's all. 

If need be you can put a few contraints (like making the parent a mandatory field when creating the child) to make the lookup behave similar to a Master Detail.

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

All Answers

AshlekhAshlekh
Hi,

There is only 2 Master Detail Relationship allowed per object and it can have upto three custom detail levels. Each object is allowed to have one or two masters, or up to 8 details.


As you said that you have created already Account and Opportunity as a Master-Detail.


-Thanks
Ashlekh Gera
Steve CairneySteve Cairney
You're right the Media Cost object already has 2, but does that mean it cannot be the parent of the new object?
William TranWilliam Tran
Steve, you don't need the relationship to be MasterDetail, you can just create a normal lookup relationship.

MasterDetail is a special type of lookup relationship (like the child cannot exist without the parent, etc.), that's all. 

If need be you can put a few contraints (like making the parent a mandatory field when creating the child) to make the lookup behave similar to a Master Detail.

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
This was selected as the best answer
Steve CairneySteve Cairney
Thank William, that makes sense (especially the part about adding contraints!)