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.
setLineItemValue - not working?
I'm trying to set the line item values for quantityonhand and quantitycommitted to the var that I have in place below in the code. It's not working. I shouldn't have to call it locationquanityonhand or locationquantitycommitted because I set the warehouse field value (row) first, correct?
Can someone tell me why this code doesn't work?
var record = nlapiLoadRecord('inventoryitem', itemId) || []; record.setFieldValue('location', fen); record.setLineItemValue('inventoryitem', 'item', 1, itemId); record.setLineItemValue('inventoryitem', 'quantityonhand', 1, adjusted); record.setLineItemValue('inventoryitem', 'quantitycommitted', 1, adjusted); var recordid = nlapiSubmitRecord(record, true);0