Discussions
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. Join us
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.