Salesforce Fact #660 | renderStoredEmailTemplate
While sending email related to VF email template from apex code, the translation might not work correctly using Messaging.SingleEmailMessage. The email template contains multiple custom labels and translation are also added accordingly.
There is a method renderStoredEmailTemplate(templateId, WhoId, WhatId) of Messaging class which can render and translate the email data correctly corresponding to the intended language.
Calling this method consumes one SOQL query count.
Comments
Post a Comment