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.
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