Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

I need to be able to load and render an email template in a visualforce page. What are my options here?

I understand that loading it is as simple as querying the EmailTemplate table. Now how do I render it in my visualforce page so the letterhead appears, etc?

share|improve this question
add comment

1 Answer 1

Your somewhat limited in your ability to render the template with any of the built-in Visualforce components, for one there isn't a way to get 'Merge Fields' to render the accompanied values.

With that in mind, I think the safest way to do it would be to create a frame and render the EmailTemplate.HtmlValue (EmailTemplate) as un-escaped HTML once you have queried the template in your VF Controller (probably would query the template by name)

share|improve this answer
    
Hey thanks! Is there anything special I need to do about the <![CDATA[]]> markups contained in EmailTemplate.HTMLValue? –  jmrjulian Dec 26 '12 at 21:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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