Trying to cancel a return authorization like rec.s...
# suitescript
s
Trying to cancel a return authorization like rec.submitFields({ type: 'returnauthorization', id: XXXX, values: {'orderstatus': 'C' } }) and receiving an "Invalid orderstatus reference key C." error. Cancelling using native cancel button works fine and orderstatus then switches to 'C'. Any idea what I might be doing wrong?
b
in general suitescript mimics the abilities of the ui
you cant change the order status of a return authorization by editing the return authorization and setting the orderstatus field
its unlikely that you will be able to do it via suitescript
s
thanks for your reply. you could change it to other status codes via the apis so i assumed cancelling would work too.
b
clicking buttons in the ui is equivalent to the N/action module, which does not have support for the cancel button on a return authorization
s
hmm interesting, thanks battk
maybe closing the lines would have to do