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
Deepak pal 9Deepak pal 9 

can a user access be narrow down in salesforce ? if yes how. For ex , if OWD is set to public can access be lower by some means to private .

NagendraNagendra (Salesforce Developers) 
Hi Deepak,

To override OWD, you need to follow one of the below:
  • Role hierarchy - Once you’ve specified organization-wide sharing settings, the first way you can give wider access to records is a role hierarchy. Similar to an organization chart, a role hierarchy represents a level of data access that a user or group of users needs. The role hierarchy ensures that users higher in the hierarchy always have access to the same data as people lower in their hierarchy, regardless of the organization-wide default settings. Role hierarchies don’t have to match your organization chart exactly. Instead, each role in the hierarchy should represent a level of data access that a user or group of users needs.
        You can also use a territory hierarchy to share access to records. A territory hierarchy grants users access to records based on criteria such as zip code, industry, revenue, or a custom field that is relevant to your business. For example, you could create a territory hierarchy in which a user with the “North America” role has access to different data than users with the “Canada” and “the United States” roles.
  • Sharing rules - Sharing rules let you make automatic exceptions to organization-wide sharing settings for particular sets of users, to give them access to records they don’t own or can’t normally see. Sharing rules, like role hierarchies, are only used to give additional users access to records—they can’t be stricter than your organization-wide default settings.
  • Manual sharing - Sometimes it’s impossible to define a consistent group of users who need access to a particular set of records. In those situations, record owners can use manual sharing to give read and edit permissions to users who would not have access to the record any other way. Although manual sharing isn’t automated like organization-wide sharing settings, role hierarchies, or sharing rules, it gives record owners the flexibility to share particular records with users that need to see them.
  • Apex managed sharing - If sharing rules and manual sharing don’t give you the control you need, you can use Apex managed sharing. Apex managed sharing allows developers to programmatically share custom objects. When you use Apex managed sharing to share a custom object, only users with the “Modify All Data” permission can add or change the sharing on the custom object's record, and the sharing access is maintained across record owner changes.
Hope this will help you out.

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.

Thanks,
Nagendra
 
Neo Downes 12Neo Downes 12
Hi Deepak,
If OWD is set to public for a certain object, that means every user who has read access to that object can see it. You can define access to objects at Profile level (CRED), so if you do not want a certain group of people to read, create or edit then do so there. Else set your OWD to private and use sharing rules to assign access to those users who need it. 
I hope that helps.
Neo
Deepak pal 9Deepak pal 9
@Nagendra Thanks for you reply  i think  you  have answered about giving wider access to a user  my question  was if we can reduce  the access if its public on OWD.
Deepak pal 9Deepak pal 9
@neo Downes  thanks will check