I'm trying to transform a Transfer Order into an I...
# suitescript
b
I'm trying to transform a Transfer Order into an Item Receipt, the Transfer Order has multiple Item Fulfillments on it. I'm using a Map Reduce script. When I use record.getLineCount I get zero. I've tried every method for adding or selecting lines on the new Item Receipt, but I always get an error: You have attempted an invalid sublist or line item operation. You are either trying to access a field on a non-existent line or you are trying to add or remove lines from a static sublist. I am setting the item fulfillment field on the new Item Receipt but it seems the record is not updating the items list. Does anyone have any experience transforming a Transfer Order with multiple Item Fulfillments into an Item Receipt, how did you get the items in the items sublist?
b
usually you want to take a look at the url for defaultValues you need to set
take a look at the url of the item receipt when you choose which fulfillment to receive
add any additional parameters to the defaultValues when you use record.transform
b
Hi battk, thank you for reply, I do not know what you mean by look at URL, do that in UI? what default value can I set that will point to the right IF?
nevermind, I see now, I thought you could only set certain values wiht defaultValues