Reputation: 927
[0] => Array
(
[id] => 1612
[phone] => 9638527410
[email] => [email protected]
[entityid] => dummy entity
........
[recordtype] => contact
)
[1] => Array
(
[id] => 1812
[email] => [email protected]
[entityid] => dummy entity0
........
[recordtype] => contact
)
.........
.........
I got the result of all contacts like above. But now I want get only who is having Phone no. I tried
filters[0] = new nlobjSearchFilter('phone', null, 'noneof', '@NONE@');.
No success. What filter should use to get the my desired result?
Thanks in advance
Upvotes: 2
Views: 898
Reputation: 7343
Below should work using nlobjSearchFilter
nlapiSearchRecord('contact', null,
new nlobjSearchFilter('phone', null, 'isnotempty'));
If you are looking for filter expression:
nlapiSearchRecord('contact', null, ['phone', 'isnotempty', ''])
Upvotes: 3