[0] => Array
(
[id] => 1612
[phone] => 9638527410
[email] => sample@gmail.com
[entityid] => dummy entity
........
[recordtype] => contact
)
[1] => Array
(
[id] => 1812
[email] => sample0@gmail.com
[entityid] => dummy entity0
........
[recordtype] => contact
)
.........
.........
我得到了上面所有联系人的结果。但是现在我只想得到谁没有电话号码。我试过了
filters [0] = new nlobjSearchFilter('phone',null,'noneof','@ NONE @');.
没有成功。应使用什么过滤器来获得我想要的结果?
提前致谢
答案 0 :(得分:3)
下面应该使用nlobjSearchFilter
nlapiSearchRecord('contact', null,
new nlobjSearchFilter('phone', null, 'isnotempty'));
如果您正在寻找过滤器表达式:
nlapiSearchRecord('contact', null, ['phone', 'isnotempty', ''])