Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
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.