Discussions
Narrative Insights is Temporarily Unavailable due to an Infrastructure Issue. Learn how This Impacts Your Account and What to Expect While the Feature is Disabled.
Inventory Transfer of serialized items
Within a Suitelet I need to create an inventory transfer for serialized items. I am able to create simple inventory transfers for inventory items, but I've been wrestling with the detail subrecord specification without success.
This code produces - An unexpected SuiteScript error has occurred.
var xfer = nlapiCreateRecord('inventorytransfer');
xfer.setFieldValue('location', from_location);
xfer.setFieldValue('transferlocation', to_location);
xfer.selectNewLineItem('inventory');
xfer.setCurrentLineItemValue('inventory', 'item', '10');
xfer.setCurrentLineItemValue('inventory', 'adjustqtyby', '1.0');
var detailSubRecord = xfer.createCurrentLineItemSubrecord('inventory', 'inventorydetail');
detailSubRecord.setCurrentLineItemValue('inventoryassignment', 'issueinventorynumber', '12345678');
detailSubRecord.commitLineItem('inventoryassignment');
detailSubRecord.commit();
xfer.commitLineItem('inventory');
var id = nlapiSubmitRecord(xfer);
Any assistance would be appreciated. Thanks.