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.
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