Hi, anyone has experience with the commerce catego...
# suitescript
r
Hi, anyone has experience with the commerce category record? I have a simple restlet that loads the record and sorts the item sublist. however upon saving, it reverts the changes made. Tested on UI and it works fine with dragging the line items and saving after. Also checked that the role used has full access to this record. any other ideas as to why? I am doing an insertLine, setCurrentSublistValue, commitLine and tried to print the sublist before saving which is showing the correct arrangement but reverts after saving. No errors on the logs as well.
b
suitescript doesnt really have methods to move sublist lines up or down
you can probably insert a new line between 2 existing lines, but thats probably it
r
The thing is that, this was perfectly working before. I would load the record, remove all items and insertLine the sorted items and then save it. However, all of a sudden, it just stopped working. everytime the record is saved, it reverts the arrangements of the items sublist.
b
if you remove all the items, then you probably want to just use selectNewLine
r
I tested it as well with selectNewLine but same results. the order of the items defaults back after saving it.
b
sounds unfortunate
have you tried saving it twice
once with no items and the second with your items
r
Turns out it is a defect. Support were able to reproduce the bug. I just filed for a case with support. Thanks!