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
swapna muthiyaluswapna muthiyalu 

what is sharing settings in masterdetail relationship and which way it affects the sharing settings through profiles?

NagendraNagendra (Salesforce Developers) 
Hi Swapna,

This is regarding who can/what is the minimum access on a record required to create a child record for the master record.

If I need to minimum Read or Edit permission on that Master record to create a Child record using the reference for that particular master record.

Read Only: having read access to the parent would let a user write child (detail) records. This is relatively permissive. An example would be if you have can read a "school" record, you could write detail records like "classrooms" or "classes".

Read/ Write: Having read/write access to the parent would let a user write child (detail) records. This is more restrictive because having read/write access is more significant than having merely read-access. With this access, you could only insert a "classroom" if you could update the "school" record.

For Example: Say you have master object named Invoice, now you have invoice_Line_item  as child object, as one invoice can have one or many items.
That particular setting determine for adding a invoice_Line_item   to an invoice record.
If the user need to have Read permission or Edit permission on the Invoice record to do so.
 
You can realize the difference with a non-admin profile and only if the OWD for the master object (Invoice) is Private or Public Read Only.

Hope this helps.

Please mark this as solved if it's resolved so that it gets removed from the unanswered queue which results in helping others who are encountering a similar issue.

Best Regards,
Nagendra.
swapna muthiyaluswapna muthiyalu
Thanks a lot Nagendra. In the above example say if i create sharing rules for invoice object in that i give readonly access and in Master detail if i give Read/write, what will be the result of two? what is the difference between the access level when we create Master detail relationship and creating sharing rules?