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.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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