I'm having a bit of trouble with a client script that changes some items on a PO. When a user sets a checkbox to true, some items need to be updated. In all but 1 case the actual item needs to be changed. The items where the quantity or rate have to be changed all work without trouble.
However, the line in which I have to change the actual item seems to not commit. The whole line is correctly updated (item, quantity, rate, vat, etc) but it just won't commit. There doesn't seem to be anything wrong with the line since pressing "OK" in the UI immediately commits the line and using
nlapiCommitLineItem("item")
in the console also works just fine.
I also tried using different items to confirm it has nothing to do with the item being used, but they all give the same result.
The whole script is 2.0 btw
Does anyone have an idea as to what the issue might be?