0

Say I have a query that looks like

/services/data/vXX.0/query/?q=SELECT+Name+From+Account+WHERE+ShippingCity='San+Francisco'

how would I add a condition like zip=XXXXXto this query? I tried using & but it didn't appear to filter anything out.

  • try to use /services/data/v36.0/query/?q=SELECT+Name+From+Account+WHERE+ShippingCity='San+Francisco'+AND+ShippingState='San' @Jezza – Pavan tej Jun 13 '16 at 19:56
  • That executes just fine, but the actual query I'm running is /services/data/v36.0/query/?q=SELECT+Name+From+opportunity+WHERE+Completed_Deal_Docs__c=NULL+AND+StageName!=Contract which is giving a malformed query error. Maybe its the !=, I'm not sure how to do NOT either. – Jezza Jun 13 '16 at 20:26
3
/services/data/v36.0/query/?q=SELECT+Name+From+opportunity+WHERE+Completed_Deal_‌​Docs__c=NULL+AND+StageName!='Contract'

You need quotes around the value being compared against field stageName

In general, best practice is to test the query in Developer Console and then paste into the REST Explorer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.