+ Start a Discussion
MLamb2005MLamb2005 

Access current user in Visualforce Email

Can anyone tell me how to access the current user's User fields within the VisualForce email?

 

I've tried:

 

{!user.Phone}

{!currentuser.Phone}

{!from.Phone}

{!sender.Phone}

 

and got nothing.

 

If this isn't possible, how do you make generic email templates?  I've got 15 people all sending emails using the same templates, so unique, user-based templates are out of the question.

 

Thanks!
Matt

Best Answer chosen by Admin (Salesforce Developers) 
SteveAnderson41SteveAnderson41
I haven't tried this, but I wonder if you have a typo in your expression - shouldn't it be {!$User.Phone}

All Answers

SteveAnderson41SteveAnderson41
I haven't tried this, but I wonder if you have a typo in your expression - shouldn't it be {!$User.Phone}
This was selected as the best answer
MLamb2005MLamb2005

Though slightly embarrased, I'm grateful, that was it!

 

Thanks a ton.

BenPBenP

I have something similar to this.  I want to include a user's email address and phone number as the reply to contact within the email though. 

 

I pull the name of the service team's administrator from that custom object which is a lookup field.  I also want to pull in that admin's email address from their user information too.  Is that possible?