You don't need `nlobjSearchFilter` for a Filter Ex...
# suitescript
e
You don't need
nlobjSearchFilter
for a Filter Expression
a
Hey @erictgrubaugh , Can you please let me know what I am doing wrong? Below is the code var columns = new nlobjSearchColumn('id'); var totalRecords = nlapiSearchRecord(null,'customsearch476',[['shortname','equalTo','Arizona'],'or',['fullname','equalTo','Arizona']],columns);
e
Hard to say without knowing exactly what's going wrong.
Syntax looks fine.
a
Now I am trying below code var columns = new nlobjSearchColumn('id'); var totalRecords = nlapiSearchRecord(null,'customsearch476',[['shortname',null,'equalTo','Arizona'],'or',['fullname',null,'equalTo','Arizona']],columns); And getting error message "Malformed search filter expression, first two elements must be strings."
e
oh, you have too many elements in your filters; remove your `null`s
A Filter Expression is only
[fieldId, operator, value]
or potentially
[fieldId, operator, value1, value2]
for certain operators
a
Thank you so much @erictgrubaugh Now I got the result.
e
np