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
Lago S.p.a.Lago S.p.a. 

QUERY USING REST API

Hi everyone!
My boss is doing a query on SOQL using API REST, but he need a query that involves a global research of all users recycle bin.
We discovered that is possible only to make a query in our recycle bin.
Is there a way to take all recycledbin objects in the query?
Vivek_PatelVivek_Patel
Hi Lago,

You can use Database.getDeleted method to get the records of a specific object from the recyle bin. And if you want records for all the object then you will have to iterate the list of object names and call this methods for each object.

https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_database.htm#apex_System_Database_getDeleted

Regards,
Vivek Patel


Please like or mark as best answer if this answers your query to help other find the correct answer and improve the quality of developer forum.