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.
entitystatus returns Null??
I'm getting an unexpected result in my SuiteScript. I'm trying to determine the entitystatus of a record, but no matter what I try I get null. This is a mandatory field, and I have verified that the record has a status.
A sample of the code:
currentRecord = nlapiGetNewRecord();
// Get the Lead Status
var clientId = currentRecord.getFieldValue('company');
//var currentStatus = lookupFieldValue('customer', clientId, 'entitystatus');
var currentStatus =nlapiLookupField( 'customer', clientId, 'entitystatus', true );
nlapiSendEmail(135550,135550,'Script Test','value: '+currentStatus,null,null);
I've tried this with a lookupFieldValue and nlapiLookupField.
Also I should mention this is a Server SuiteScript to run whenever a phonecall is made.