Hi Guys, Is it possible i can send custom data to ...
# suitescript
m
Hi Guys, Is it possible i can send custom data to the NetSuite Custom Email Template
Copy code
var mergeResult = render.mergeEmail({
                templateId: 10,
                customdata: { field1: [], field2: somesampledata},
            });
            email.send({
                author: currentUser,
                recipients: '<mailto:myname@gmail.com|myname@gmail.com>',
                subject: mergeResult.subject,
                body: mergeResult.body,
            });
n
You'd probably need to script adding the data on to the record if it's not already present and then consume it via the template.