I am trying to transform a Transfer Order to an It...
# suitescript
a
I am trying to transform a Transfer Order to an Item Receipt. The problem I am encountering is as follows. If the transfer order was created from multiple Item Fulfillments, when you click the
Receive
button, it brings you to a screen to select which item fulfillment you want to receive. After selecting one it prefills the item receipt with those items. When doing it in code however
Copy code
var receiptRec = record.transform({
            fromType: record.Type.TRANSFER_ORDER,
            toType: record.Type.ITEM_RECEIPT,
            fromId: data.toid
})
This doesn't necessarily transform to the record that I want. How can I indicate in code which one to use?
b
pay attention to the url's query parameters after you have selected which fulfillment to receive
the query parameters are defaultValues which you need to set on your transform
a
Thanks!
Is there a way from doing a search of a transfer order, I could know which item fulfillment correlates to which line item?
b
applying transaction join
or applied to transaction join
depending on which direction you are working from