We create some object in saleseforce named Custom_kpi__c. When we delete the rows in this object we can't see that using select id , isdeleted from Custom_kpi__c where isDeleted=true. But we see that in salesforce recycle bin. How do we can see the deleted rows in query? And why isdeleted field is vary good work in other objects using select id , isdeleted from Object_name where isDeleted=true?


You need to append "ALL ROWS" to your query like this:

select id , isdeleted from Custom_kpi__c where isDeleted=true ALL ROWS

Also, you can't do that in Developer Console Query Editor.

  • I use this in Developer Console and Data Loader and have mistake in both cases: "All Rows Not allowed " - in Data Loader and "Unknown error parsing query" in Developer Console. Where do i must do this query? Jul 19 '17 at 13:15
  • you can use in: * Apex Code (Apex Class) * Anonymous Execution Window
    – Patlatus
    Jul 19 '17 at 13:25
  • We cannot use this in work base, because we don't have Global admin rights Jul 19 '17 at 13:30
  • Try Anonymous Execution Window
    – Patlatus
    Jul 19 '17 at 13:34
  • We need use this in QV code for update qvd files. Query "select id , isdeleted from Object_name where isDeleted=true" work with all others objects well in code. Why it doesn't work in this case? Jul 19 '17 at 13:42

Are you using the "QueryAll()" API call? Using the regular "Query()" call won't allow you to retrieve delete records. See the API documentation on the "QueryAll()" API call here:


  • we used option QueryAll in QlikView connector and have error ALL ROWS not allowed in this context Jul 20 '17 at 9:46
  • your link doesn't work Jul 20 '17 at 10:34
  • @Oleg - Updated the link. Please update as answer to help others.
    – Arun SFDC
    Jul 25 '17 at 6:32
  • How can i use QueryAll in QlikView code? Jul 26 '17 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.