Tags
To fetch Role and Profile name for the logged in user in APEX, use the following SOQL:
SELECT UserRole.Name, Profile.Name FROM User
Please note that UserRole and Profile are lookup fields in User object.
28 Monday Sep 2015
Posted Apex
inTags
To fetch Role and Profile name for the logged in user in APEX, use the following SOQL:
SELECT UserRole.Name, Profile.Name FROM User
Please note that UserRole and Profile are lookup fields in User object.