Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Help with nlapiMergeRecord
Hi All,
I am trying to use the nlapiMergeRecord and nlapiSendEmail API's to merge and send a customer's details
I have no problem in sending the email template to the customer but none of the fields are mergin onto the email template???
below is my code
function executeSavedSearch(){ //locate the saved search var searchresults = nlapiSearchRecord('customer', 3178, null, null); for (var i = 0; searchresults != null && i < searchresults.length; i++) { //locate some values of the saved search var customerid = searchresults[i].getId(); var companyname = searchresults[i].getText('companyname') nlapiLogExecution('DEBUG', 'Getcompany', 'company id is: ' + customerid + ' and the company name is: ' + companyname); merge_fields_arr = new Array(); //I have got'NLADDRESS' referenced on my template but is not replicating on the adress on send of email merge_fields_arr['NLADDRESS'] = 'TEST ADDRESS'; var emailbody = nlapiMergeRecord( 92, 'customer', customerid, null, null, merge_fields_arr).getValue(); nlapiSendEmail(138006, 0