+ Start a Discussion
JimPDXJimPDX 

VF Email Template on a Lead - Not Merging?

This seems like it should be extremely basic. I have a VF template both relatedToType and recipientType = "Lead". I have two simple apex components to provide style sheets and signature (personalized to the user). When I preview the template within Setup, and specify a Lead record, it shows the customized text and personalized signature.

 

When my user started testing it, she complained that the "Send Email" button on the Lead (after selecting the template) was not inserting the field from the object. It had worked for me previously. So I tested it and am now having the same problem. Previews fine but when I send it, the merge data ("Lead.Email_Text__c") does not appear and the field "Program__c" is not being sent to the component as an attribute either. Again both merge fields work fine in Preview mode.

 

We must be overlooking something obvious here? The components and attributes are global. The lead records are shared publicly (not that it should matter if I am using the template on an object I own).

 

Any ideas? Thanks.