You need to sign in to do that
Don't have an account?
Salesforce Blitz
how to get user id form role id
How to get user id from role id in salesforce.
I have user role id (Role Hierarchy ). I need to obtain the user id.
How to retrieve..?
Thanks
Laxman jagz
I have user role id (Role Hierarchy ). I need to obtain the user id.
How to retrieve..?
Thanks
Laxman jagz
Please find the query for get the user id and name from Role
Query:
User uName=new User();
uName=[SELECT Id,name, UserRoleId FROM User where UserRole.Name='CEO' (Role Name) OR UserRoleId='00E28000000Ug9pEAC'(Role Id)];
system.debug('Username=='+uName);