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
Burt ChenBurt Chen 

cannot create ... this object is the master in another master-detail relationship

Hello,

I was following the section in the trailhead as below:
Developer Beginner-->Data Modeling-->Creating Object Relationships-->Creating a Master-Detail Relationship

After creating the multilevel master-detail relationships as below:
1, one candidate can have one or more job applications
2, one job application can have one or more reviews

I tried to created another relevant master-detail relationship as below:
3, one position can have one or more job applications

But it's not feasible, and the field type-->Master-Detail Relationship has information as below:
You cannot create this type of field because a master-detail relationship already exists on this object, and this object is the master in another master-detail relationship.

Can anyone adivse is it possible to create the relationship 1,2 and 3 above?
If not possible, any equivalent substitution?

Thank you in advance.

Burt



 
Best Answer chosen by Burt Chen
Mike ArthurMike Arthur
Yes, it's quite possible that you may want 3 M-D relationships - but you can't!

I had a similar situation a little while ago and had to make a decision on which one to implement as a lookup instead.

The Trailhead module that you are looking at explains the differences between master-detail and lookup so have a look at the capabilities of each and use that to decide which relationship to do as a lookup.

All Answers

Nitin Paliwal 9Nitin Paliwal 9
Hey,
You cannot accomplish this using master-detail relationship. You can do one thing:
1- You can create lookup relationship between job application and reviews instead of master. Then you can use it with "Position" for the relationship .

Thanks
Mike ArthurMike Arthur
Hi Burt,

sounds like you've hit a restriction on the number of master-detail relationships permitted so you need to make one of them a lookup relationship instead.
Burt ChenBurt Chen
Thank you, Nitin / Mike.
Change one of the relationship to looup can work.

Further question:
According to the features of Master-detail relationships -- You can’t create a detail record without a master record.
It seems it's possible for a practical project to require the all the 3 relationship to be Master-detail.
Is the assumption correct?

If it's correct, anyone has similar experience?

Thank you,
Burt
Mike ArthurMike Arthur
Yes, it's quite possible that you may want 3 M-D relationships - but you can't!

I had a similar situation a little while ago and had to make a decision on which one to implement as a lookup instead.

The Trailhead module that you are looking at explains the differences between master-detail and lookup so have a look at the capabilities of each and use that to decide which relationship to do as a lookup.
This was selected as the best answer
Hamsa AnushaHamsa Anusha
Hi Everyone,


for me creating even 2nd Master detail relationship this notification is coming:
You cannot create this type of field because a master-detail relationship already exists on this object, and this object is the master in another master-detail relationship.

please help me in this query.


Thanks