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
Neha Garg 39Neha Garg 39 

Set sharing setting for opportunity as Controlled by parent

Hi, can anyone help me to find an answer to the following question : 

The VP of Sales at Universal Containers has requested that Sales reps be given access to view all Accounts in Salesforce. However, they’ve also requested that sales reps only be allowed to create new Opportunities on Accounts they own. How can this requirement be met?
A. Create an Opportunity Validation Rule that compares the Opportunity and Account Owners.
B. Create a new Opportunity Quick Action that validates Account ownership.
C. Set the Organization-Wide Defaults sharing on Opportunities to Private and recalculate sharing.
D. Set the Organization-Wide Defaults sharing on Opportunities to Controlled by Parent.
Some post says Answer is D, but I didn't find 'Control by parent' option for the opportunity in Sharing setting.
 
Santosh Kumar 348Santosh Kumar 348
Hi Neha,

Your observation is correct 'Control By Parent' won't be available on Opportunity as that option is only available in case of Master Detail relationship only. Correct option would be "C" as if you will refer the Salesforce documents it  clearly states that View All for a given object doesn't automatically give access to its detail objects. In this scenario, users must have Read access granted via sharing to see any associated child records to the parent record.

You can refer the details on below link:
https://help.salesforce.com/articleView?id=users_profiles_view_all_mod_all.htm&type=5 (https://help.salesforce.com/articleView?id=users_profiles_view_all_mod_all.htm&type=5)

Mark this answer as the Best Answer if it has helped you.

Regards,
Santosh kumar
Neha Garg 39Neha Garg 39
Hi Santosh kumar,
Thanks for your answer. but I have a question that you said 'Control by parent'  is available for master detail relationship only , But I found, like account opportunity, Account and contact also have look up relationship still 'Control by parent' option is available for contact. I am just curious why this option is missing for some objects?
 
Santosh Kumar 348Santosh Kumar 348
Hi Neha,

Contact is an exceptional case which is LookUp Relationship but behave like MD relationship and all the features of Master Detail is available for it.

Mark the thread as Closed by selecting it Best Answer if it has helped you.

Regards,
Santosh Kumar