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!
Unable to call Suitelet from addButton Userevent?
I am trying to load and email document when a button is clicked.Iam getting 'id' missing error. I am sure that I am not connecting them properly. Can anyone please suggest where am I doing wrong?
Suitelet:
function Email_SIForm(request, response)
{
var SOid = nlapiGetRecordId();
nlapiLogExecution('DEBUG', 'SOid', SOid);
var sorecrd = nlapiLoadRecord('salesorder',SOid);
var SI = sorecrd.getFieldValue('custbody_dwr_salesorder_si' );
nlapiLogExecution('DEBUG', 'SI', SI);
var file = nlapiLoadFile(SI);
nlapiLogExecution('DEBUG', 'file', file);
var newEmail = nlapiSendEmail(3, 'sru@test.com.au', 'Sample email and attachment', 'Please see the attached file', null, null, null, file);
}
UserEvent:
function beforeload_MojEmailFile(type, form, request){