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!
Don’t miss your chance to meet our SuiteGurus—NetSuite Support professionals and subject matter experts with extensive experience in select product areas, including OneWorld, Advanced & Basic Accounting, Supply Chain Management, Receivables & Payables, CRM, Account Administration, and the SuiteCloud Platform. Full Conference attendees can prebook exclusive 30-minute one-on-one sessions for your product questions.
Spots are limited! Register through your Agenda Builder and find SuiteGuru under Agenda Enhancements.
nlapiSendEmail sending two copies of attachments
Hi,
I have a script that is automatically sending an email to a custom record in our system.
The (simplified) script is shown below
function afterSubmitPartnerApplication(type){
if (type != 'delete') {
var id = nlapiGetRecordId();
var type = nlapiGetRecordType();
var notification = nlapiGetFieldValue('custrecord_notificationsent');
if (notification == 'F') {
var status = nlapiGetFieldValue('custrecord_applicationstatus');
var name = nlapiGetFieldValue('custrecord_firstname') + ' ' + nlapiGetFieldValue('custrecord_lastname');
var hruser = '15386';
var emailRecords = new Object();
emailRecords['recordtype'] = 'customrecord_partnerapplication';
emailRecords['record'] = id;
var emailFields = new Object();
var attachments = new Array();
emailFields['NLFULLNAME'] = name;
var user = hruser;
var email = nlapiGetFieldValue('custrecord_emailaddress');
if (status == '13') {
var template = '105';