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
Pranita Gujar 32Pranita Gujar 32 

I want to restrict access of Accounts/Contact/Opportunity based on roles. My OWD settings is private fro all three mentioned object. How do I achieve the same.

Harsh P.Harsh P.
Hi Pranita,

Your OWD is Private for Account/Contact/Opp that means user in upper in the heirarchy only can access the record and Below in heirarchy can not see it.
I will recommend you to create one profile which restrict the access of account/contact/Opp.and assign to that user which need to restrict access. So you do not worry about OWD.After assigning profile to this user,no matter of OWD and the user above the hierachy.

Regards,
Harsh P. 
Pranita Gujar 32Pranita Gujar 32
Hi Harshad,

Thanks for the update but all users needs access to Acc/contact/opp...
Could you please elaborate with steps.
I even checked the role Hierarchy but all users no matter which role can view accounts.
Harsh P.Harsh P.
Then you want to restrict access for which users. Role contains the user as you know.