使用 java rest api post 方法从 salesforce 中删除记录
delete records from salesforce using java rest api post method
我可以使用 java rest api 删除 salesforce 中的多条记录吗?
PostMethod post = new PostMethod(instanceURL
+ "/services/data/v34.0/sobjects/Note/delete/"+listofIds);
post.setRequestHeader("Authorization", "OAuth " + authToken);
HttpClient httpClient = ProxyAuth.getLocalProxy();
int statusCode = httpClient.executeMethod(post);
您可以通过创建 Post Url 来删除多条记录,就像这样:
String str = '';
for(String st : listOfIds){
str += 'id='+st+'&';
}
str = str.substring(0 , str.length());
PostMethod post = new PostMethod(instanceURL
+ "/services/data/v34.0/sobjects/Note/delete/records?"+str);
我可以使用 java rest api 删除 salesforce 中的多条记录吗?
PostMethod post = new PostMethod(instanceURL
+ "/services/data/v34.0/sobjects/Note/delete/"+listofIds);
post.setRequestHeader("Authorization", "OAuth " + authToken);
HttpClient httpClient = ProxyAuth.getLocalProxy();
int statusCode = httpClient.executeMethod(post);
您可以通过创建 Post Url 来删除多条记录,就像这样:
String str = '';
for(String st : listOfIds){
str += 'id='+st+'&';
}
str = str.substring(0 , str.length());
PostMethod post = new PostMethod(instanceURL
+ "/services/data/v34.0/sobjects/Note/delete/records?"+str);