Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Update: Narrative Insights has been restored and is now available.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Script Error: define is not defined
I have a script that extracts Expiration Date from Inventory Detail that is running successfully on a SandBox/Production account. I copied this script to another Sandbox account (Netsuite OneWorld) with the same settings. However, the execution logs show this error:
ReferenceError: "define" is not defined. (INVOCATION_WRAPPER#11)
In what situation keyword "define" is not recognized? Here is the script:
/**
* @NApiVersion 2.0
* @NScriptType ClientScript
*/
define(['N/record','N/search'], function(record,search) {
function saveRecord(context) {
var rec= context.currentRecord;
var customer = rec.getValue({fieldId : 'entity'});
setExpiryDate(rec);
log.debug(title+'setExpiryDate','completed');
return true
}
function setExpiryDate(rec){
var title = 'setExpiryDate()::';
0