function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sailor67Sailor67 

Get deleted records Ids via REST API, SOQL?

I am using the REST API on a client app and want to sync deleted records on server /client side respectively. How can I retrieve Ids from records there are in Recycle Bin?

 

We have tried the SOQL query:  

SELECT Id, IsDeleted FROM Account WHERE IsDeleted=true

but it only gave this result despite the fact there are mutiple deleted Account items in the Recycle Bin:

 

<QueryResult>
  <done>true</done>
  <totalSize>0</totalSize>
</QueryResult>

 

Why is this, is there any solution?

@anilbathula@@anilbathula@

HI,

 

Try this if you want to get all the records which are in recycle bin.

 

SELECT Id, IsDeleted FROM Account WHERE IsDeleted=true ALL ROWS

 

 

Sailor67Sailor67

Just tried but returns error Http 400 Bad Request..

Ankit AroraAnkit Arora
Sailor67Sailor67

Thanks,

But we are using the standard REST API which allows Http calls only..

Sailor67Sailor67

Ankit, I would be very grateful if you or any other Salesforce representative could indicate if this is possible or not to accomplish via the standard HTTP REST API?