Can You Use The LIKE Operator In SOQL Queries Via The REST API?


Answer :

Yes you can. SOQL in the rest API supports all the same constructs that its SOAP older brother does. Remember to pass the SOQL as the 'q' parameter in the URL,and to URLEncode the soql when putting it in the query, e.g.

https://na1.salesforce.com/services/data/v25.0/query?q=select+id+from+account


I think the issue is with the url encoding of the % in the like clause.

I just tried the following in the Workbench Rest API and it worked.

/services/data/v25.0/query?q=select+id+from+account+where+BillingState+like+'VIC%25' 

Comments

Popular posts from this blog

Are Regular VACUUM ANALYZE Still Recommended Under 9.1?

Can Feynman Diagrams Be Used To Represent Any Perturbation Theory?