• Dhananjay Misal 8
  • NEWBIE
  • 0 Points
  • Member since 2015
  • Salesforce Developer
  • venkys


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
How can I show alert message on my user's home page when workflow rule is triggered ?

Is there any way to get the profile name of logged in user without querying the user object.

 

I know the following solution:

 

String usrProfileName = [select u.Profile.Name from User u where u.id = :Userinfo.getUserId()].Profile.Name;

 

Instead of this I want to save 1 query so if there is any method to get the profile name in apex without firing the query please let me know.

 

Thanks,