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.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
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