You need to sign in to do that
Don't have an account?

Resolve an email template
I have built a custom VF form to send an email and I'd like to build in the same template functionality as is found on the Salesforce Send an Email form. i.e. the abilty to select a template, resolve the merge fields and place the resulting text in an email body text field on the form.
Does anyone know if it's possible to resolve an email template in this way? Or equally, can anyone confirm that it's not possible.
Thanks
as long as you set up the email with the proper methods (setTargetObjectId and setWhatId for instance), you should be OK on merge fields. setTemplateId is used to link the template, but the documentation seems to be missing for this method specifically. other methods mention it, but this one isn't specifically called out in the doc. I presume the syntax is the same for the other "set ID" methods though.
See "Single Email Message Methods" in the documentation for more info.
Paul, thanks for your reply. I have in fact got it working by setting the template id on the SingleEmailMessage class when actually sending the email but what I wanted to acheive is to resolve the template before sending the email and place the resolved text in an inputTextArea on my send email form for the user to then enter their email text and subsequently click a send button. Very much like you can on the standard Salesforce Send an Email form. But I'm not sure whether this is possible
Regards
Neal