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.
NetSuite has launched SuiteSuccess Wholesale Distribution Edition, in Japan. Please join us the webinar on February 12 that introduces NetSuite solution with demos and case studies for Wholesale Industry.
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.