+ Start a Discussion
Rocks_SFDCRocks_SFDC 

How to include Logged in User as merge field in Email Template

Hi Team,

 

In Text type of Email Templates, i want to specify logged in user as merge field. Could anyone have any suggestions.

I have tried with the following lines. But it is not working.

 

$User.FirstName

{!User.FirstName}

 

 

Thanks,

Anil

Best Answer chosen by Admin (Salesforce Developers) 
Vinita_SFDCVinita_SFDC

Hi Anil,

 

You are using only '!', please use '!$' like {!$User.FirstName}

All Answers

Vinita_SFDCVinita_SFDC

Hello,

 

You can use merge fields in the subject and body of custom HTML templates, not in a text type email template. For details please refer:

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=merge_fields_email_templates.htm&language=en_US

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=valid_merge_fields.htm&language=en_US

Rocks_SFDCRocks_SFDC

Hi Vinitha,

 

I have used other merge fields like {!Account.Name} and {!Account.Link} in text type of email templates.They are working fine.

 

But when we try to inlude the logged in user, i am not able to do that.

 

Thanks,

Anil

kevin lamkevin lam

Have you tried {!Sending_User.field_name}?

Vinita_SFDCVinita_SFDC

Hello Anil,

 

As per the first documet i provided which states "You can use merge fields in the subject and body of custom HTML templates." i gave my answer but when i tried i am able include merge fields in the text template.

 

For including current username try: {!$User.FirstName}

Rocks_SFDCRocks_SFDC

I have tried {!User.FirstName}, but it is not working.

Vinita_SFDCVinita_SFDC

Hi Anil,

 

You are using only '!', please use '!$' like {!$User.FirstName}

This was selected as the best answer
Rocks_SFDCRocks_SFDC

Thanks Vinita..it worked..

Mister Lee 2Mister Lee 2
Lovely visit of this website.Awesome and really nice post. Thanks for the great share and I must say it's written nicely.
Like to bookmarking this website and surly visit again. Keep posting visiting. (https://wofcheatsanswer.com/)
fbprofile fbprofilefbprofile fbprofile
Long names are trending anywhere these days. Most of the facebook users love to use lengthy names due to the fact lengthy names appearance greater appealing & cool than the fast one. fb profile names collection 2020  You also can attempt Long fb profile names for your account. Just reproduction any of those names & paste in first & last name field on your facebook account.