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.
Server Scripts on Webstore
We're having problems running User Event scripts on webstore orders on a couple of our accounts. The afterSubmit script is below:
function onAfterSubmit()
{
//var record = nlapiGetNewRecord();
nlapiLogExecution('DEBUG', 'script start');
var recType = nlapiGetRecordType();
nlapiLogExecution('DEBUG', 'Rectype', recType);
var recId = nlapiGetRecordId();
nlapiLogExecution('DEBUG', 'RecId', recId);
var record = nlapiLoadRecord(recType, recId);
var isWebstore = record.getFieldValue('webstore');
if(isWebstore == 'T')
{
nlapiLogExecution('DEBUG', 'try block', isWebstore + recId);
}
else
{
nlapiLogExecution('DEBUG', 'try block', 'not a webstore' + recId);
}
}
None of the log execution statements show up when we create an order through our test webstore. Surprisingly, we have none of these troubles with our 3rd account. Is there some feature or preference to set that enables user event scripts to run on webstore orders?