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
Chaitra GVChaitra GV 

How to restrict record access

Two users are having same profile and same role. If we want to restrict the record usage to one of the users, how can we achieve it?
Best Answer chosen by Chaitra GV
Deepali KulshresthaDeepali Kulshrestha
Hi Chaitra,

Please refer the below links:
https://developer.salesforce.com/forums/?id=9060G0000005VEKQA2
https://developer.salesforce.com/forums/?id=906F0000000kJuAIAU
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_data_access.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Deepali Kulshrestha

All Answers

NagendraNagendra (Salesforce Developers) 
Hi Chaitra,

May I suggest you please refer to below links from the community forums with a similar discussion which might help you further. Hope this helps.

KIndly mark this as solved if the reply was helpful.

Thanks,
Nagendra
Aleksei KosovAleksei Kosov
You can restrict the use of records to two users (Sharing Settings -> Organization-Wide Defaults, Current Object -> Access - Private). Then give access to the records group(in which one of the users). (Sharing Settings -> Current Object Sharing Rules -> new)
Deepali KulshresthaDeepali Kulshrestha
Hi Chaitra,

Please refer the below links:
https://developer.salesforce.com/forums/?id=9060G0000005VEKQA2
https://developer.salesforce.com/forums/?id=906F0000000kJuAIAU
https://developer.salesforce.com/docs/atlas.en-us.securityImplGuide.meta/securityImplGuide/security_data_access.htm

I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks.
Deepali Kulshrestha
This was selected as the best answer