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!
Adding Multiple Items in Transaction
I'm trying to clone multiple lines of the same item in an order.
So far the coding below does not seem to work:
function addPanels() { var i = 0; //Get Item Name var panelToAdd = nlapiGetFieldText('custbody_quote_panel_to_add'); //Get Number of Items to Clone var panelNum = nlapiGetFieldValue('custbody_quote_panel_number'); for (i; i < panelNum; i++) { nlapiInsertLineItem('item'); nlapiSetCurrentLineItemText('item','item', panelToAdd); } return true; } function postSourcing(type, fldname) { nlapiCommitLineItem('item'); return true; } Currently it will add one line but then it will stop. I've also tried getting the item value and then setting the Value but it doesn't seem to work like the text version of the get and set.
0