HI! I am trying to pass some data to an email temp...
# suitescript
a
HI! I am trying to pass some data to an email template, when I pass entity object it works fine, but I am struggling to add custom data, I have an array of objects that I want to pass to email template in order to populate a table. Could not find anything useful in the docs.
Copy code
const mergeResult = render.mergeEmail({
    templateId: emailTemplateId,
    entity: {
        type: record.Type.JOB,
        id: parseInt(recordId),
    }
});
c
You may need to go the alternate route of creating a TemplateRenderer and adding in your data that way.
a
Could you please elaborate on that?