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
force noviceforce novice 

User

How can we restrict a user to see a record?
Best Answer chosen by force novice
~Onkar~Onkar
You can restrict the user by OWD private and open sharing by 4 ways.

1. Role Hierarchy (Role Hierarchy of your ORG)
2. Sharing Rules (Define some rule on your Object)
3. Manual Sharing (By using the sharing button on record detail page layout)
4. Apex Managed Sharing (Write Apex Code and based on your business rule Insert user in <<Object>>__share with appropriate access (read, Read/write))

All Answers

Vinit_KumarVinit_Kumar
You can restrict the user's profile so that no permission is available for that particular object.
~Onkar~Onkar
You can restrict the user by OWD private and open sharing by 4 ways.

1. Role Hierarchy (Role Hierarchy of your ORG)
2. Sharing Rules (Define some rule on your Object)
3. Manual Sharing (By using the sharing button on record detail page layout)
4. Apex Managed Sharing (Write Apex Code and based on your business rule Insert user in <<Object>>__share with appropriate access (read, Read/write))
This was selected as the best answer
CRMandresGCRMandresG
In addition to the above, you can filter it out from their list views and/or create a queue that person does not have accss to and move the record there.