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

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 2
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.