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
prasad vivekprasad vivek 

Hi, My question is regarding checking whether users have access to specific object or not.

Hi, My  question is regarding checking whether users have access to specific object or not.

In my scenario I have a set of user ids and for these user ids I have to check if they have access to specific object or not. I have done my POC on this, but I am not able to acheive this. I tried this by using metadata but failed.
Nandigam RajeshNandigam Rajesh
Hi Prasad,
It may helps you:
https://www.iterativelogic.com/how-to-tell-if-a-user-has-access-to-a-record/
Please feel free to revert back for any issues.

Regards
Rajesh
Salesforce | Technician
SandhyaSandhya (Salesforce Developers) 
Hi,

You can use below query
 
[SELECT 
	RecordId
	, HasReadAccess
	, HasEditAccess
	, HasDeleteAccess 
FROM 
	UserRecordAccess 
WHERE 
	UserId=:UserInfo.getUserId() 
	AND 
	RecordId =: Account.Id];

Best Regards,
Sandhya
prasad vivekprasad vivek
Hi, Thanks for your reply. But I think I want to check if we have access to specific object or not specific record, bcz the object which i want to check is child object not current object what i am verifying. My scenario is like this, I have one approver and on click of submit I have to check if he has access to another child object of current object.
 
Shubham4462Shubham4462
okay so check user profile then go to this application PermComparator  https://perm-comparator.herokuapp.com/  here you can check user have access to related object or not  by users name you can also find the user have access or not  if it helps please close this question.