Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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!