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
venkateswararao pasupuletivenkateswararao pasupuleti 

how to find the owner ship of the child records if it is having two master detail relation ship?

NagaNaga (Salesforce Developers) 
Hi Venkateswararao,

Master-Detail relationships are more tightly coupled relationships.

Master-Detail relationships have the following properties.

• When two objects are in Master-Detail relationship (also called master-child relationship) the detail/child follows the master.

• The ownership of the child record is given to the master objects owner. The child does not have separate owner.

• The detail inherits the sharing, security settings as well as the look and feel of the master.

• A master record is always required for storing the child record.While creating a Master-Detail relationship; there must be absolutely no record of the object. If there are some records, create a lookup instead. Fill the lookup fields of all the records and then convert it into a Master-Detail.

 • If the master record is deleted, the child record is also deleted.

• In a Master-Detail relationship between a standard object and custom object,the custom object will always be the detail record.

• An object can maximum of two master objects. In cases of multiple objects,both the masters are required. If one master is deleted, the child object gets deleted immediately.
• A Master-Detail can be multiple level deep, parent-child-grand-children.

Please let me know if this helps

Best Regards
Naga kiran