Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Add item Group to order via SuiteScript
Does anybody have a working code example of how to create sales orders that contain an Item Group via SuiteScript?
I have been banging my head against a wall for about 24 hours here... Netsuite throws an INVALID_NUMBER error with these (gloriously non-specific) details: You entered "{rate}" into a field where a numeric value was expected. Please go back and change this value to a number.
Here's what I'm doing: var newSalesOrder=nlapiCreateRecord('salesorder',{entity: 3751090, recordmode: 'dynamic'});
newSalesOrder.selectNewLineItem('item');
newSalesOrder.setCurrentLineItemValue('item','item',114270); // ID is for a itemgroup
newSalesOrder.setCurrentLineItemValue('item','quantity',1);
newSalesOrder.commitLineItem('item');
nlapiSubmitRecord(newSalesOrder,true,false);