Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Setting Lot Number on Item Receipt
Please tell me this has been done ... and I've not run into a SS2 Bug. Its very simple, I'm fully receiving a PO and need to add the Lot Number to the line.
var itemReceipt = record.transform({fromType: 'purchaseorder', fromId: 1, toType: record.Type.ITEM_RECEIPT, isDynamic: true}); itemReceipt.selectLine({ sublistId: 'item', line: 0 }); itemReceipt.setCurrentSublistValue({ sublistId: 'item', fieldId: 'itemreceive', value: true }); itemReceipt.setCurrentSublistValue({ sublistId: 'item', fieldId: 'quantity', value: '5' }); var inventoryDetail = itemReceipt.getCurrentSublistSubrecord({ sublistId: 'item', fieldId: 'inventorydetail' }); inventoryDetail.selectNewLine({ sublistId: 'inventoryassignment' }); inventoryDetail.setCurrentSublistValue({ sublistId: 'inventoryassignment', fieldId: 'receiptinventorynumber', value: 'FAKE_LOT' }); inventoryDetail.setCurrentSublistValue({ sublistId: 'inventoryassignment', fieldId: 'quantity', value: '5' }); inventoryDetail.commitLine({ sublistId: 'inventoryassignment' }); itemReceipt.commitLine({ sublistId: 'item' }); itemReceipt.save(); 0