Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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){