You need to sign in to do that
Don't have an account?
Steve Berley
mail setTemplateID not working
In the snippet below… templateID is valid and set active. Can query it no prob.However the template does not show in the resulting email.
If instead, I use mail.setHtmlBody() it works fine. Any ideas why templates aren't working?
If instead, I use mail.setHtmlBody() it works fine. Any ideas why templates aren't working?
id templateID='00X1R000000f3T1UAI'; Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); mail.setTemplateId(templateID); Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });
Did you have enables the Available For Use in email template ?
Also test the template using Send Test and Verify Merge Fields.
Thanks,
Maharajan.C
Can you please share below detail:
1 Are you using dynimic email template
2. object name that's you are using in email
REgards
Mukesh