How to send email in Netsuite using email templates in Suitlets

            id = xxx;
            internalID = xxxxx;
            var emailMergerHeader = nlapiCreateEmailMerger(id); // templateId
            emailMergerHeader.setEntity('contact',contactID);   
            var  mergeResult = emailMergerHeader.merge();
            var emailBody = mergeResult.getBody();
           
            nlapiSendEmail(internalID, Email, 'Thank you for request',
                           emailBody,'xyz@gmail.com');

Popular posts from this blog

What are sales territory in Netsuite?

How to get and set a sublist in netsuite suitlet suitescript 2.0