Trying to code a Suitelet to fulfill a TO, keep getting the error "The total inventory detail quantity must be 1." Code is below. Any ideas? I've gone in so many circles trying to get this to work....must be missing something very minute
var fulfillment_record = nlapiTransformRecord('transferorder', 534568, 'itemfulfillment', {recordmode: 'dynamic'}); fulfillment_record.selectLineItem('item', 1); fulfillment_record.setCurrentLineItemValue('item', 'quantity', 1); fulfillment_record.setCurrentLineItemValue('item', 'itemreceive', 'T'); var subrecord = fulfillment_record.createCurrentLineItemSubrecord( 'item', 'inventorydetail'); subrecord.selectNewLineItem('inventoryassignment') ; subrecord.setCurrentLineItemValue('inventoryassignment', 'quantity', 1); subrecord.setCurrentLineItemValue('inventoryassignment', 'binnumber', 134); subrecord.commitLineItem('inventoryassignment'); subrecord.commit(); fulfillment_record.commitLineItem('item'); var id = nlapiSubmitRecord(fulfillment_record, false, true);