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.
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Keep an eye out for upcoming NetSuite events, including meetups, workshops, and webinars. These sessions are a great way to connect with peers, learn from experts, and stay current on the latest NetSuite updates and best practices. Registration links are provided in each event.
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