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().