Discussions
SuiteWorld is the largest annual gathering of the NetSuite community! It will be held in Las Vegas on October 6-9, 2025. Our customers and partners look forward to SuiteWorld every year as a place to hear the latest from NetSuite, get hands-on learning, and connect with each other. Register now!
Now, you can stay up-to-date with the latest discussions, helpful tips, and important announcements, all delivered straight to your inbox. Whether you’re looking to catch up on what you missed or just want a quick overview, our email digest has you covered. To learn more and to subscribe, click here.
Help with server script please!
Hello all,
Need some help again! I am using a server script deployed as a After Submit Function of Customers, to create a custom record entry when a new Customer is created. The code executes without an error, however, the Customer field in the custom record is blank. Can anyone help?
function afterSaveCustomer(type)
{
if (type.toLowerCase() == 'create')
{
var newRecord = nlapiGetNewRecord();
var customer = newRecord.getFieldValue('entityid');
var record = nlapiCreateRecord('customrecord79');
record.setFieldValue('custrecorddirtnocustomer', customer);
record.setFieldValue('custrecordlastdirtused', 100);
nlapiSubmitRecord(record,true);
}
}
Thanks!
Regards.. Srilatha