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)
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.Sign up to join this community
Yes -- this can be done with a clever solution from this SFSE wizard @PJC
Leverages the apex SavePoint and Rollback to trick SFDC into rendering and retrieving the rendered value