+ Start a Discussion

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:




Why is this, is there any solution?




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




Just tried but returns error Http 400 Bad Request..

Ankit AroraAnkit Arora


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


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?