Please could anybody help as I am getting unexpected error for the following when I am using ‘anyof’ operator within the filter
var accountArray = [];
var accountSearch = search.create( {
type: search.Type.ACCOUNT,
filters: [
[ 'isinactive', 'is', 'F' ], 'AND',
[ 'number', 'anyof', [ '40099', '21081', '12001' ] ]
],
columns: [ 'number', 'internalid' ]
} );
accountSearch.run().each( ( result ) => {
accountArray.push( {
number: result.getValue( 'number' ),
internalid: result.getValue( 'internalid' )
);
return true;
} );
I tried using both array and string but it works only for a single account using ‘is’ operator but keep getting unexpected error for ‘anyof’ operator