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!
TransformRecord
Hello
I am trying to Transform SalesOrder to Purchase order (on saleorder creation)
function AfterSubmit(type)
{
if (type!="create") return;
var so=nlapiGetNewRecord();
var po=nlapiTransformRecord("salesorder",so.getId(),"purchaseorder");
nlapiSubmitRecord(po);
}
I am using the code avobe but failing so fare with unexpected error:
Error: UNEXPECTED_ERROR
syntax error (AfterSubmit#10)
Stack Trace:
#AfterSubmit
Is it possible to Transform Sales orders to Purchase orders? and if yes then any ideas why the code is not working?
Thanks
Ash
0