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!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Weird error while creating Sales order
Hi, Im pretty new to suite scripting and am trying to create a sales order through a schedule script. An error occurs on nlapiSubmitRecord call. The error does not make any sense. I have checked the iternal ids for the customer entity and item and they exist in the db.
Error: INVALID_NUMBER
You entered "To Be Calculated" into a field where a numeric value was expected. Please go back and change this value to a number.
Code:
function createSalesOrder()
{
//Create a Sales Order record.
var record = nlapiCreateRecord('salesorder');
record.setFieldValue('entity', 176);
record.setLineItemValue('item','item', 1, 80);
record.setLineItemValue('item', 'quantity', 1, 10);
0