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
sfnoobsfnoob 

Difference between getDeleted() and queryAll(isDeleted=true, systemtimerange)

- Is there any difference betwen getDeleted(timerange) vs queryAll(with filters isDeleted=true and timerange for systemmodtime)

 

- The documentation is Seriously confusing. There is an automatic purging process that can remove things from the delete log after the size increases or if deleted for > 30 days etc that seems to affect getDeletec()  but how does queryAll() get affected? is it affected the same way?()

 

Why do I need to use getDeleted() over queryAll()? - query all also gives me all the fields notjust the id for example.

 

Thanks for any help.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

queryAll will only return soft deleted rows, there are many ways for row to get hard deleted, and not all object types support soft deleted rows. getDeleted() still works though in all those cases.

All Answers

SuperfellSuperfell

queryAll will only return soft deleted rows, there are many ways for row to get hard deleted, and not all object types support soft deleted rows. getDeleted() still works though in all those cases.

This was selected as the best answer
sfnoobsfnoob

Thanks Simon, is there any documentation on what the soft deletes and the hard deletes are.