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