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