Discussions
Join the NetSuite community to innovate, connect, and discover what’s next.
SuiteWorld brings thousands of innovators, builders, and leaders together to learn, connect, and shape what’s next. This October, explore how to build a stronger foundation for growth through inspiring keynotes, major product reveals, hands-on sessions, and unforgettable moments—all in one place for our biggest event of the year. Register now
Create PO from Script
This is doing my head in I am trying to create a PO from a SO, however I am having the same issues everyone else seems to have "Exception Thrown and not caught". I have broken it down and simpified it for the purpose of this post, the code I have is
var record = nlapiCreateRecord('purchaseorder');
record.setFieldValue('entity', 32 );
record.setFieldValue('currencyname', 'US Dollar');
record.setFieldValue('customform', 107);
record.setFieldValue('exchangerate', '0.74');
record.setFieldValue('trandate', '26/3/2009');
record.setLineItemValue('item', 'item', 1, 21);
record.setLineItemValue('item', 'quantity', 1, 10 );
record.setLineItemValue('item', 'price', 1, 1 );
var id = nlapiSubmitRecord(record, true, false)
Why doesn't it work, does some one have a guide as to what fields I need to complete, I have completed all the mandatory fields for the main section.