Discussions
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. Join us
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.'