Created
January 8, 2020 17:06
-
-
Save srujan21/ac740a601f0c9d50a157284c8b103b3c to your computer and use it in GitHub Desktop.
Merge record data in email template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static string renderEmailTemp(Id objctId, List<String> bodies){ | |
// Id of the sObject, list of Email template bodies | |
List<Messaging.RenderEmailTemplateBodyResult> renderEmailTemplateBodyRes= Messaging.renderEmailTemplate(null,objctId, bodies); | |
return renderEmailTemplateBodyRes[0].getMergedBody(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment