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!
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?