I am searching for records that have the same Name as the current record to prevent a save for duplicate names. I am getting this error on this search: An nlobjSearchFilter contains invalid search criteria: altname.
Yes, 'altname' is the field name. I have also tried 'altName' in the search for curious sake. Is this an invalid search filter? I need to get this value somehow in a scripted search.
var name = nlapiGetFieldValue('altname');
var filters = new Array();
var columns = new Array();
filters[0] = new nlobjSearchFilter('altname', null, 'is', name);
columns[0] = new nlobjSearchColumn('internalid');
var results = nlapiSearchRecord('customrecord_ncfar_asset', null, filters, columns);
If you are searching a custom record, use 'name' instead of 'altname'.