I've an email template and I've few merge fields in them. This email template was working fine until we migrated this to a new environment.

So, first thing is that I'm using the same email field to send the email alert (which works fine since I'm receiving the email). But the value is empty when I use it in the template as a link.

<a href="{!Object__c.URL__c}/apex/page?
   target="_blank">To Approve please click here </a>

The email field {!Object__c.Email_Field__c} is not populating whenever the email is sent out but the other fields have values populated.

I've checked that the fields are in same object, fields have values, the field accessibility, tested the merge fields and it works like a charm.

Am I missing anything else? And yeah, the email alerts are working as expected in the older environment from where it is migrated.

Thanks in advance!

  • You might want to check to see if the field type is still the same as before the migration on both your template and the object.
    – crmprogdev
    May 8, 2015 at 17:09
  • so when you preview the template in the email template editor, the value of email_field__c appears? But it doesn't appear when you do a test send from within the email template editor?
    – cropredy
    May 9, 2015 at 0:07
  • @crmprogdev : I checked the type in the object and it remains the same as Email Type. May 11, 2015 at 6:40
  • @crop1645: I can see the field in Preview and I also get values while test send . But the thing is I'm not getting the values when its fired from the workflow. May 11, 2015 at 6:41
  • what would be different is that in email template preview you, Vignesh, is the running user but in workflow, the running user is whoever ran the transaction. I know you checked field accessibility but maybe check again?
    – cropredy
    May 11, 2015 at 21:22

3 Answers 3


It is a weird issue, but it got fixed when I cloned the email template and used it in the workflow's email alert instead of the old email template. This seems to be a bug, as the new email template is an exact replica of the old one (didn't even copy paste, it was just cloned).


I faced this crazy issue when I copy+pasted the merge field from one environment sb to another. It got fixed when i copied the field from the 'Copy Merge Field Value' text box from the 'Available Merge Fields' in the Email template, sounds like a crazy solution, but it worked for me!

  • Will try that and let you know if it worked! May 12, 2015 at 7:07

I also spent way too much time trying to make an extremely simple Classic Email Template (Text) work. The issue appeared to be that I had cloned an existing template, and tried to modify some merge fields there. Some things worked, others didn't... crazy. It all worked like a charm when I started from scratch (i.e. removed the cloned template and created a new one). A bug indeed!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .