2

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?
         email={!Object__c.Email_Field__c}
         &action=approve
         &Id={!Object__c.Id}
         &param={!Object__c.Level__c}" 
   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 '15 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 '15 at 0:07
  • @crmprogdev : I checked the type in the object and it remains the same as Email Type. – Vignesh May 11 '15 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. – Vignesh May 11 '15 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 '15 at 21:22
2

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).

1

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! – Vignesh May 12 '15 at 7:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.