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.
getLineItemValue fails under certain circumstances
We have a scheduled script that loops through line items on a sales order and retrieves the values of custom item options. Turns out that if the first item on the sales order does not have a particular custom item option, all calls to getLineItemValue(...) for subsequent items fail to retrieve the value of that particular custom item option.
So, for example, if the first item on a sales order has only one custom item option 'color' and the second item on the sales order has two item options 'color' and 'size,' the call to getLineItemValue(...) to retrieve the value of 'size' on the second item returns 'null' even though that item option field for the second item in the sales order list is definitely populated with a value other than 'null.'