Discussions
Read on for the latest updates including:
• Agenda Builder launch
• SuiteWorld On Air registration
• New NetSuite Prompt Studio Contest
• And more!
Check out this thread to learn more!
nlapiMergeRecord
I'm trying to send a merged email from a custom record when a particular field is checked. There is something about the nlapiMergeRecord line that doesn't allow the script to work -- when I // that line the script basically works.
Another smaller problem is I would like to have the copy of the email attached to the custom record mail merge history -- somehow the recordID in the nlapiSendEmail line doesn't work either.
Any suggestions?
function MergeAndSendEmail()
{
var author = nlapiGetUser();
var recipient = nlapiGetFieldValue('custrecordr7nxlicensecontact');
var recordType = nlapiGetRecordType();
var recordID = nlapiGetRecordId();
if ((nlapiGetFieldValue('custrecordr7nxlicensesendactivationemail') == 'T'))
{
var emailBody = nlapiMergeRecord( 172, recordType, recordID, null, null, null );