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
KiedenKieden 

Question on custom object Master-Detail relationships

The Winter '06 documentation states that: "Each custom object can have only one master-detail relationship, but can have many lookup relationships, up to a total of 25 relationships. Each relationship is included in the maximum number of custom fields allowed."

I have a scenario where I would like to create multiple master detail relationships with a few custom objects. For example:

Object 1 (Master) (Detail) Object 2 (Master) (Detail) Object 3 (Master) (Detail) Object 4

Is there a specific reason why this restriction is in place that I should be aware of? Or is this something coming on the roadmap?

Thanks!
adamgadamg
Hmm. Note that the type of relationship effects the delete behavior, so you could end up with orphaned objects - other than that I don't know why it wouldn't work.
kraigkraig
I was hoping to create an environment where deleting Object 1 cascades the delete all the way down (deleting all children, grandchildern and so on).

Object 1 (Master) (Detail) Object 2 (Master) (Detail) Object 3 (Master) (Detail) Object 4

It appears that this is not possible yet. Anyone found a workaround, or something I'm missing? Thanks.
KaikakuKaikaku

This look like an old post, but I'm trying to do the same Master - Detail - Sub. 

Just like Kraig I'm wondering if it is possible? or is there a work around ?

MackMack
I have a similar issue, where a Custom Object cannot be the child (Detail) of more than one Master.  My scenario is an HR System where a Contact may Apply for multiple Role Vacancies. I have two Custom Objects: "Application" and "Role" - where "Application" is the child of both the "Role" and the "Contact". If either the "Role" or "Contact" records are deleted, so should the "Application" record be deleted.  Unfortunately, this is no possible in SalesForce, any work-arounds?
ChannaChanna

We can create 2 master details relationships for a Custom Object.

 

25 Look up relations can be created to a custom object.

 

For a standard object only 1 master detail relationship can be created.