VALID_LINE_ITEM_REQD when transform from Sales Order to Item Fulfillment

Jira Code : MICL-358

You must have at least one valid line item for this transaction error will stop us from creating an item fulfillment from a sales order at the stage of record.transform() if we did not specify an inventoryLocation in the defaultValue parameter.

Here is a working code which creates an item fulfillment via record.transform().

let ifRecObj = record.transform({
        fromType: 'salesorder',
        fromId: 111111, //your sales order id
        toType: 'itemfulfillment',
        isDynamic: true,
        defaultValues:{
            inventorylocation: 2222 //your location id
        }

Leave a comment

Your email address will not be published. Required fields are marked *