The code looks like this: ...
# suitescript
s
The code looks like this: inventoryDetailSubrecord.setSublistValue({ sublistId: 'inventoryassignment', fieldId: 'receiptinventorynumber', line: m, value: lotId }); inventoryDetailSubrecord.setSublistValue({ sublistId: 'inventoryassignment', fieldId: 'inventorystatus', line: m, value: statusId }); inventoryDetailSubrecord.setSublistValue({ sublistId: 'inventoryassignment', fieldId: 'quantity', line: m, value: qtyInLine }); leftQty = leftQty - qtyInLine; inventoryDetailSubrecord.commitLine({ sublistId: 'inventoryassignment' }); newRecObj.commitLine({ sublistId : 'item' }); var finalRecordId = newRecObj.save({ enableSourcing: true, ignoreMandatoryFields: true });