索引--salesforce中查询中的非法字符

时间:2016-05-03 08:19:34

标签: salesforce

出现此错误:

索引61处的查询中的非法字符:

https://cs4.salesforce.com/services/data/v32.0/query?q=Select +AppId__c,Technical_Review_Approved__c +From Application__c + Where + AppId__c+= '1793poiuyt' 

甚至试过这个:

String url = "/query?q=";
String getRecords = url + "Select AppId__c,Technical_Review_Approved__c From Application__c Where AppId__c= '1793poiuyt' " ;


Caused by: java.net.URISyntaxException:  Illegal character in query at
index 61: 
https://cs4.salesforce.com/services/data/v32.0/query?q=Select AppId__c,Technical_Review_Approved__c From Application__c Where AppId__c= '1793poiuyt'

1 个答案:

答案 0 :(得分:1)

您不能在网址中包含空格。查看REST开发人员指南:https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm

示例:https://na1.salesforce.com/services/data/v20.0/query/?q=SELECT+name+from+Account -H "Authorization: Bearer token"