Is it possible to query a 'where like' list of string with remote object? That is possible in Apex soql:
Set<String> LikeNameSet= new set<String>();
LikeNameSet.add('%test1%');
LikeNameSet.add('%test2%');
List <Contact> conList = [select id, email from Contact where email like:LikeNameSet];
However I tried the analogy in vain using remote object:
<apex:remoteObjects >
<apex:remoteObjectModel name="Contact" jsShorthand="conRemoteObj" fields="Id, Email"/>
</apex:remoteObjects>
<script>
...
var conObj = new SObjectModel.conRemoteObj();
let likeEmailList = ['%test1','%test2%'];
let criteria = {
where: {
Email: {like: likeEmailList }
}
};
conObj.retrieve(criteria,callback);
function callback(){
//do something here...
}
...
</script>
the code above results in javascript alert error like:
> Error in Callback Contact Invalid criteria specified for
> retrieval. ValidationError [code=11, message=Data does not match any
> schemas from "oneOf", path=/where, schemaKey=null]
I cannot find anything about this where-like syntax in documentation:
thanks in advance