You need to sign in to do that
Don't have an account?
Problem with SOQL Filtering 'like' when using Tooling-API
I am trying to use Tooling-API and query all Classes using this string:
String soqlQuery = SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01pf0000000DHYYAA4\'
This works fine and loads the particular class, BUT if I try :
String soqlQuery =
SELECT+Coverage,ApexClassorTrigger.name,ApexClassorTriggerId+FROM+ApexCodeCoverageAggregate+where+ApexClassorTriggerId+=+\'01p%\'
I get this error on page: " Malformed JSON: Expected '{' at the beginning of object "
Can anyone tell what is wrong ? or is it that LIKE clause cannot be used while constructing a Query ?
(This is later passed to : HTTPRequestInstance.setEndpoint(URL + soqlQuery); )
% will replace only 1 character, try using 15 %s and re try which may solve the problem.
I would suggest you use a list rather than storing a single object record.
Regards,
Ashish
I think by now you would have found probable solution, but mentioning a similar post for others reference here:
https://developer.salesforce.com/forums/ForumsMain?id=906F00000008yBcIAI