The same script works correctly when working with ...
# suitescript
k
The same script works correctly when working with Discount line items on the same transaction, but if I try to use the transaction level Discount Item field it dies with the error.