Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
Hy!
How can I get information about the user profile (System Administrator, standard user, standard platform user) in apex code?
Hey there,
You use SOQL. For example you can get the name of the profile that the current user is assigned to by doing this...
Profile p = [SELECT Name FROM Profile WHERE Id = :Userinfo.getProfileId()];
Hey there,
You use SOQL. For example you can get the name of the profile that the current user is assigned to by doing this...
Profile p = [SELECT Name FROM Profile WHERE Id = :Userinfo.getProfileId()];