I'm using the SObject Rows API to get the fields values of a given record. It works fine on existing records but when used on deleted records it returns with an error of {"errorCode":"NOT_FOUND","message":"The requested resource does not exist"}.

As the docs note, Accesses records based on the specified object ID. Retrieves, updates, or deletes records.

Can I retrieve deleted records with this API? if not, is there a way to retrieve the deleted records field values/data for a given record ID?


1 Answer 1



QueryAll will return records that have been deleted because of a merge or delete. QueryAll will also return information about archived Task and Event records. QueryAll is available in API version 29.0 and later.



For retrieving additional query results if the initial results are too large:



Query Based on Id

  • But QueryAll does not let me query by a specific record, am I right? I don't want to query ALL my deleted records, just the ones I define by their ID Commented Jan 11, 2016 at 8:31
  • @AlonWeissfeld try with queryAll/?q=SELECT+Id,Name,isDeleted+FROM+Account+WHERE+Name='test'
    – Ratan Paul
    Commented Jan 11, 2016 at 8:32
  • I only have the ID, not any of the other fields Commented Jan 11, 2016 at 8:34
  • @AlonWeissfeld then use Id field /services/data/v35.0/queryAll/?q=SELECT+Id,Name,isDeleted+FROM+Account+WHERE+Id='0019000001cH0ud'
    – Ratan Paul
    Commented Jan 11, 2016 at 8:36
  • @AlonWeissfeld let me know if you have any issue here?
    – Ratan Paul
    Commented Jan 11, 2016 at 8:44

You must log in to answer this question.

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