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