I'm trying to transform a transfer order into an i...
# suitescript
s
I'm trying to transform a transfer order into an item fulfillment and set the status to picked , I'm confused how to choose the first available lot number for the item
Copy code
var ifRec = record.transform({
        fromType: record.Type.TRANSFER_ORDER,
        fromId: rec.id,
        toType: record.Type.ITEM_FULFILLMENT,
        defaultValues: {},
      });
      ifRec.setValue({ fieldId: "shipstatus", value: "C" });
b
do a search to find the available lots for your items
then pick whichever one(s) you want
beware if you have to support duplicated items, duplicated items introduce edge cases that are less forgiving to unoptimized solutions