How to get all Salesforce records even from recycle bin or Achieved Activities using SOQL query?
we cannot do it directly within the Query Editor of developer console.If I run the query in query editor what will happen?!!....I hope you got the answer. But there's a workaround for we can test it in Developer Console. The workaround is to use the "Execute Anonymous Window".
1. Open "Enter Apex Code" window by selecting "Debug" -> "Open Execute Anonymous Window" menu
2. Enter your query there and output the result to the log. Check the "Open Log" checkbox.
List<contact> clist = [SELECT name FROM contact ALL ROWS];
System.debug(JSON.serialize(clist));
3. Click "Execute" to run your code and check the log file for your result.
Special Note:
Deleted data is stored in the Recycle Bin for 15 days.
Interesting Link:
https://salesforce.stackexchange.com/questions/4020/whats-the-actual-meaning-of-all-rows-in-soql
No comments:
Post a Comment