You need to sign in to do that
Don't have an account?
Sirisha N
no viable alternative at character '"' errorCode: MALFORMED_QUERY when passing value in the WHERE clause in the REST API URL
I tried executing the following Rest API on the Salesforce workbench -
in REST Explorer
/services/data/v48.0/query/?q=SELECT+Total_Cost__c+from+DBA_Invoice__c+where+Name="I-525"
I get the following response-
MALFORMED_QUERY
message: from DBA_Invoice__c where Name="I-525" ^ ERROR at Row:1:Column:52 line 1:52 no viable alternative at character '"'
errorCode: MALFORMED_QUERY
However, it works without the where clause.
Could you please tell me how do specify the value in the where clause?
in REST Explorer
/services/data/v48.0/query/?q=SELECT+Total_Cost__c+from+DBA_Invoice__c+where+Name="I-525"
I get the following response-
MALFORMED_QUERY
message: from DBA_Invoice__c where Name="I-525" ^ ERROR at Row:1:Column:52 line 1:52 no viable alternative at character '"'
errorCode: MALFORMED_QUERY
However, it works without the where clause.
Could you please tell me how do specify the value in the where clause?
/services/data/v48.0/query/?q=SELECT+Total_Cost__c+from+DBA_Invoice__c+where+Name='I-525'
All Answers
/services/data/v48.0/query/?q=SELECT+Total_Cost__c+from+DBA_Invoice__c+where+Name='I-525'