Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
2022.1 behavior of setSublistValue changes
This isn't really a question, because I know there's no answer. But I felt obliged to tell you anyway.
In a suitelet (suiteScript 2.1) I have:
ifLineSublist.setSublistValue({
id: 'itemctncnt',
line: lineIdx,
value: calcCartonCount(ifData.item_sublist[lineIdx].quantity, itemData)
});
That code ran just fine at 5PM yesterday in our sandbox. Now it pukes with
"type": "internal error",
"code": "INVALID_FLD_VALUE",
"details": "You have entered an Invalid Field Value 339.0 for the following field: itemctncnt",
The fix is to change the value property to
value: calcCartonCount(ifData.item_sublist[lineIdx].quantity, itemData).toString()
Hint: It's an integer. The function being called uses parseInt() to make sure it returns an integer. It used to automatically cast an integer to a string properly, and now it doesn't. Expect lots of production code to break, at great expense to you and your customers. Congratulations!