Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
setting the value of a sblist field in a field change event
I am using a form client script. I am trying to the change the value of a field in a sublist. I can tell the script executes, but does not set the value
Is this correct?
if (context.fieldId == 'location' || context.fieldId == 'quantity') {
Object.keys(context.currentRecord).forEach(function(key) {
// alert('key:' + context.currentRecord[key]);
}); //**************for each function**************
context.currentRecord.setCurrentSublistValue({ sublistId : 'item',
fieldId : 'quantity',
value : 12 ,
ignoreFieldChange: false });
var sublist = 'Sublist: ' + context.fieldId;
log.debug('Field Changed: ', sublist);
// log.debug( 'Field Change', 'Sublist:' + context.sublistId + ':' + context.fieldId );
alert('Sublist:' + context.sublistId + ':' + context.fieldId);