Hi Guys, Appreciate help on this! I'm trying to tr...
# suitescript
y
Hi Guys, Appreciate help on this! I'm trying to transform sales order to item fulfillment using SS1 or SS2 but getting below error. Has anyone encountered this error before? Error message : "VALID_LINE_ITEM_REQD You must have at least one valid line item for this transaction".
d
@Yogesh Tahiliani do you have inventory status enabled? we recently enabled it and all our scripts that transform sales orders to item fulfillments broke. In our case we had to add the inventorydetail subrecord to the item fulfillment item lines.
y
I am adding inventory details. The script gives error on the first line itself that is on record.transform
d
in my case, i needed to add a default values param...
Copy code
record.transform({
  fromType: record.Type.SALES_ORDER,
  toType: record.Type.ITEM_FULFILLMENT,
  fromId: sales-order-internal-id,
  defaultValues: {
    inventorylocation: some-location-id,
    recordmode: 'dynamic'
  }
})
and i believe since we're adding subrecords to the item sublist, we need to be working in dynamic mode
but
inventorylocation
was also required.
y
I tried to add these default values as well, but no luck..
d
you may or may not need to add shipgroup to the
defaulValues
as well, i think it will default to the first ship group anyway
y
I will try it.. thank you!!