You need to sign in to do that
Don't have an account?

ASP.net HTTP request with patch method
Example for creating Accountcurl
https://na1.salesforce.com/services/data/v20.0/sobjects/Account/customExtIdField__c/11999 -H "Authorization: Bearer token" -H "Content-Type: application/json" -d @newrecord.json -X PATCHExample request body newrecord.json file
{ "Name" : "Express Logistics and Transport" }My ASP.net code :
using (WebClient client = new WebClient()) { client.Headers.Add("Authorization", "Bearer " + token.access_token); client.Headers.Add("Content-Type", "application/json"); NameValueCollection reqparm = new NameValueCollection(); reqparm.Add("Name", "This Is Test Data"); byte[] responsebytes = client.UploadValues(token.instance_url + "/services/data/v20.0/sobjects/Account/customExtIdField__c/11999", "PATCH", reqparm); string responsebody = Encoding.UTF8.GetString(responsebytes); }Above code is not working. Getting Error (405) Method Not Allowed. I don't know how to use Patch Method.
You should be doing something like
but I don't see this anywhere in your code snippet
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others and improve the overall quality of Discussion Forums.
Gaurav Kheterpal
Certified Force.com Developer| Salesforce Mobile Evangelist| Developer Forums Moderator| Dreamforce Speaker