0

I made a connected app to create / update/ delete salesforce standard as well custom objects using curl which was working fine with my development server but when i change app settings to live server URL delete record is not working, here is the response i am getting on local/live server Local Server :

Request URL :

https://fundwise.my.salesforce.com/services/data/v20.0/sobjects/Strong_Account__c/a1X46000001AFtwEAG

RESPONSE

Array
    (
        [status] => 204
        [response] => 
    )

Live Server Request URL :

https://fundwise.my.salesforce.com/services/data/v20.0/sobjects/Strong_Account__c/a1X46000001AFtwEAG

RESPONSE:

Array
    (
        [status] => 200
        [response] => {"attributes":{"type":"Strong_Account__c","url":"/services/data/v20.0/sobjects/Strong_Account__c/a1X46000001AFtwEAG"},"Id":"a1X46000001AFtwEAG","IsDeleted":false,"Name":"ELAN  FIN AN CIAL SER VICE","CreatedDate":"2017-09-01T11:46:11.000+0000","CreatedById":"00546000000trZ5AAI","LastModifiedDate":"2017-09-01T11:46:11.000+0000","LastModifiedById":"00546000000trZ5AAI","SystemModstamp":"2017-09-01T11:46:11.000+0000","Limit__c":5000.0,"Balance__c":4950.0,"Date_Opened__c":"2016-03-01","Opportunity__c":"00646000006GxxMAAS"}
    )

I am cluless why this is happening with live server though app is same, also i made a new app with a thought may be issue with app settings for local and local is still working fine with a new app.

1
  • You might consider updating your path to use a more current API version v.40 /services/data/v40.0/sobjects/ (which equates to Summer '17) rather than v.20 (which was Winter '11)
    – Mark Pond
    Commented Sep 18, 2017 at 4:54

1 Answer 1

0

It looks like you called the resource with the wrong "verb." You'll want to check your code and/or configuration. The same URL is used for updating records, retrieving records, and deleting records (using PATCH, GET, and DELETE, respectively). Make sure you're using the correct verb.

4
  • But same URL working fine with development server, with curl DELETE method @sfdcfox Commented Sep 18, 2017 at 10:12
  • @LeenaVashistha Again, I expect that you'll find you're using the wrong verb. The URLs would indeed be identical, but the method is wrong.
    – sfdcfox
    Commented Sep 18, 2017 at 13:46
  • Sir the code is exact copy paste on both server , may be i am not getting you would you please elaborate more. and what do you mean by verb exactly ? Commented Sep 18, 2017 at 15:44
  • Thanks a lott Sir , its working now with curl DELETE method which exactly i was missing on live server code. @sfdcfox Commented Sep 18, 2017 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .