For a sales order with committed line items can be converted by setting default value as inventory location. Kindly refer to the transform code below. let trecord = record.transform({ fromType: “salesorder”, fromId: salesOrderId, toType: “itemfulfillment”, defaultValues: { ‘inventorylocation’: locationInternalId } }); If the sales order is uncommitted and the feature “Allow uncommitted” is enabled in… Continue reading Transform sales order to item fulfillment
Tag: Transform
Error when transforming Sales order to item fulfillment
Error has been resolved by adding the default value (inventory location) var itemFulfilmentObj = record.transform({
Transforming transfer order based on item fulfillment
/** * * @param docNum * @param IFDetails * @param ifInternalId * @return {*|number} */ function IRcreation(docNum, IFDetails, ifInternalId) { try { let trecord = record.transform({ fromType: record.Type.TRANSFER_ORDER, fromId: docNum, toType: record.Type.ITEM_RECEIPT, isDynamic: true, defaultValues: {‘itemfulfillment’: ifInternalId.toString()} }); let itemCount = trecord.getLineCount({sublistId: ‘item’}); log.debug(‘in itemCount’, itemCount); for (let i = 0; i < itemCount; i++)… Continue reading Transforming transfer order based on item fulfillment