+ Start a Discussion
SURESH COOLSURESH COOL 

apex

 

 

HOW WE KNOW LOGED IN USER PROFILE NAME IN APEX?

 

bob_buzzardbob_buzzard

No need to shout :)

 

You get the id from UserInfo and then the name via a SOQL query. Something like:

 

Id profileId=UserInfo.getProfileId();
Profile p=[select Name from Profile where id=:profileId];

 

SURESH COOLSURESH COOL

Thanx bob

 

 

 

vbsvbs

As an alternative if used in VF pages then:

 

$Profile.Name