function readOnly(count){ }
Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
List<Account> accList=[SELECT Id FROM Account ALL ROWS];
List<Account> accList=[SELECT Id FROM Account WHERE isDeleted = true ALL ROWS];
List<Account> accList=[SELECT Id,Name FROM Account ];
List<Account> accList=[SELECT Id,Name FROM Account ALL ROWS ];
List<Account> accList=[SELECT Id,Name FROM Account WHERE isDeleted = true ALL ROWS];
you have to add ALL ROWS at the end of the query and the condition IsDeleted = true.
E.g.: [SELECT Id FROM Account WHERE IsDeleted = true ALL ROWS]
This query return all the accounts in the recycle bin.
Bye
To get record including recycle bin you can write query like below which will give you account including recyle bin .
If you wnat account record only from recycle bin then you need to use below query .
For more detail about All Rows please follow below link .
http://https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_SOQL_query_all_rows.htm
Thnaks
Manoj
In the second query if remove the ALL ROWS also will get Account records which is there in recycle bin, what is the use to adding here ALL ROWS ?
and one more thing if i run the second query, getting error like "un konw error parsing query" why ?
Thanks
Please check below comments it will clear all your doubts .
1.To get all accounts records excluding recyclebin . 2.To get all account records including recyclebin .
3.To get all account records only from recycle bin . NOTE :We cannot use the ALL ROWS keywords with the FOR UPDATE keywords.
Thanks
Manoj