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:
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();
This is a cached copy. Click here to see the original post.