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!
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
0