Play Games

Search This Blog

Thursday, November 26, 2015

How to query deleted records from recyclebin in salesforce

If we want to query deleted records from recycle bin,we need to use "ALL ROWS" Keyword.
Example:To query all the deleted accounts.
List<Account> accountList = [select id,name from account where isdeleted = true ALL ROWS];
system.debug('accountListaccountList'+accountList);
Output:

No comments:

Post a Comment