3

Is there a way, using Apex, to trigger the rendering of a VisualForce email template and capture the result as a string?

This would be used to set the HTML Body of an email to be sent using an external service (HTTP call-out)

3

Yes -- this can be done with a clever solution from this SFSE wizard @PJC

https://salesforce.stackexchange.com/a/8745/2602

Leverages the apex SavePoint and Rollback to trick SFDC into rendering and retrieving the rendered value

| improve this answer | |

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.