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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
SuiteSegments: Issues setting values via SS 2.0
I'm trying to set the values of some custom segments on a custom record that we've created. I am able to set the values using SuiteTalk without issue, however when trying to set the values using SuiteScript 2.0 I am unable to get them to save. Either the value is blank or I get an exception saying invalid value (which is a valid value for the field)
Here is my current code:
var brand = returnAuthRec.getSublistValue({ sublistId: 'item', fieldId: 'custcol_cseg_rr_brand', line: i, }); var returnReasonRecord = record.create({ type: 'customrecord_return_reason', isDynamic: false, }); returnReasonRecord.setValue({ fieldId: 'custrecord_1682_cseg_rr_brand', value:returnAuthRec.getSublistValue({ sublistId: 'item', fieldId: 'custcol_cseg_rr_brand', line: i, }), ignoreFieldChange: true, }); returnReasonRecord.save(); 0