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
Sourcing Doc. No in Create Record Script
I have written a script to create a new custom record when a sales order is saved. I have successfully gotten the script to pull the entity id, shipto address, and other custom fields, but I cannot get it to load the Doc. No or "tranid" from the Sales Order.
var currentRecord = nlapiGetNewRecord();
var CustomerName = currentRecord.getFieldValue('entity');
var Order = currentRecord.getFieldValue('tranid');
var recordCreated = nlapiCreateRecord('customrecord6');
recordCreated.setFieldValue('custrecord10', CustomerName);
recordCreated.setFieldValue('custrecord4', Order);
For custrecord4, which is the field for Order # on my custom record, I have tried setting the type to List/Record and Free-Form Text. Niether of these is working.