I'm trying to set the line item values for quantityonhand and quantitycommitted to the var that I have in place below in the code. It's not working. I shouldn't have to call it locationquanityonhand or locationquantitycommitted because I set the warehouse field value (row) first, correct?
Can someone tell me why this code doesn't work?
var record = nlapiLoadRecord('inventoryitem', itemId) || []; record.setFieldValue('location', fen); record.setLineItemValue('inventoryitem', 'item', 1, itemId); record.setLineItemValue('inventoryitem', 'quantityonhand', 1, adjusted); record.setLineItemValue('inventoryitem', 'quantitycommitted', 1, adjusted); var recordid = nlapiSubmitRecord(record, true);