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
Akshay ShrivastavaAkshay Shrivastava 

how to restrict user to not see other users records

i have created a app ..in which iam using standard objects..i want to restrict user not to see the records created by admin  
Best Answer chosen by Akshay Shrivastava
Suraj Tripathi 47Suraj Tripathi 47

Hi Akshay,

You control record-level access in four ways.
Org-wide defaults specify the default level of access users have to each other’s records.
Role hierarchies ensure managers have access to the same records as their subordinates. Each role in the hierarchy represents a level of data access that a user or group of users needs.
Sharing rules are automatic exceptions to org-wide defaults for particular groups of users, to give them access to records they don’t own or can’t normally see.
Manual sharing lets record owners give read and edit permissions to users who might not have access to the record any other way.

Please refer this link

https://trailhead.salesforce.com/content/learn/modules/data_security/data_security_sharing_rules

 

Please mark it as Best Answer if it helps!

Thank You!

All Answers

ANUTEJANUTEJ (Salesforce Developers) 
Hi Akshay,

 >> https://developer.salesforce.com/forums/?id=9060G000000MOkqQAG

As mentioned in the above link please refer the following details to restrict users to view other user records.

Profiles
 (configured under Admin Setup->Manage Users->Profiles) are used to control which Salesforce objects (database tables) are available to Users assigned to the Profile, and what actions those Profile Users are allowed to perform on the table.  Profiles can be configured to allow for Create, Read, Write, and Delete access on an object-by-object basis.  Salesforce provides several Standard Profiles that are configured for some general purposes.  These Standard Profiles can’t be edited, but you can use them as a starting point by cloning them into Custom Profiles that suit the needs of your org.

Roles 
(configured under Admin Setup->Manage Users->Roles) are used to control which Salesforce records are available to Users assigned to the Role. Unlike Profiles, there is no configuration in a Role.  Instead, Roles are arranged in a hierarchy.  Top level Roles can contain lower level Roles.  Record access is determined by the Role of the Record Owner.  Any member of the Role hierarchy above the Record Owner’s Role will have access to the record. Users in the same Role as the Record Owner, and Users in Roles outside of that hierarchy, may or may not have access.  By default, all Users have Read-Write access to all records in Salesforce.  However, this is controlled by Organization Wide Sharing — a topic for another time.

Additionally, I would suggest you to check this article as well: https://help.salesforce.com/articleView?id=security_data_access.htm&type=0&language=en_US&release=204.10#firstQueryMeta=%5Bobject%2520Object%5D

Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.  

Thanks.
Suraj Tripathi 47Suraj Tripathi 47

Hi Akshay,

You control record-level access in four ways.
Org-wide defaults specify the default level of access users have to each other’s records.
Role hierarchies ensure managers have access to the same records as their subordinates. Each role in the hierarchy represents a level of data access that a user or group of users needs.
Sharing rules are automatic exceptions to org-wide defaults for particular groups of users, to give them access to records they don’t own or can’t normally see.
Manual sharing lets record owners give read and edit permissions to users who might not have access to the record any other way.

Please refer this link

https://trailhead.salesforce.com/content/learn/modules/data_security/data_security_sharing_rules

 

Please mark it as Best Answer if it helps!

Thank You!

This was selected as the best answer