[SalesForce] How to set multiple objects as parents for a custom object

I have requirement where a custom objects needs to have multiple objects as its parents.
For example a custom object must have master-detail relationships with Account, Opportunity, Case etc.
We can set only two Master detail relationships on a custom object.

So I am not able to figure out any way in which we can setup this.
Can anyone please suggest an approach.

I need the relationships to be M-D because we need the sharing of the object to be controlled by parent.

Best Answer

We cant create more that M-D on any object and there is really good reason why Salesforce do now allow us to create more than 2 two. Read more about data skew problem if you want to know why.

If you want to control sharing based on other(parent) record access then you can simply make all objects private and create your won sharing rules or apex manual sharing and achieve same functionality with out M-D.

Related Topic