I am getting an unhelpful error "You have an inval...
# suitescript
n
I am getting an unhelpful error "You have an invalid sales order 73751293 or the order is already closed." when I am attempting to transform a transferorder record to itemfulfillment using record.transform(). the record type is not a sales order and it is not closed. also the transfer order is is still open an pending receipt. has anyone gotten this error when attempting to transform transfer order to item fulfillment? I also checked the supported transformation types and transferorder to itemfulfillment is supported.
m
Is the transaction with internal id 73751293 the transfer order you want to transform? Or is it a sales order?
n
@MGBC it sure is a transfer order
m
Are all the items committed to the TO? Also how are you referencing lines on the IF by line ID or itemkey?
Oh wait that TO is pending recipt. That means it’s already got an item fulfillment so you can’t fulfill it again
n
@MGBC maybe that is it. the script was able to partially fulfill the transfer order. then when we received additional api calls from the warehouse to fulfill the remaining it errored out
we had to manually create the 2nd item fulfillment due to the error which is why the document shows pending receipt now
I can try removing the fulfillment and try running the script again
k
Is it definitely the correct environment?