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