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
?
Add a comment
|
2 Answers
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? Commented Jul 19, 2017 at 13:15
-
you can use in: * Apex Code (Apex Class) * Anonymous Execution Window– PatlatusCommented Jul 19, 2017 at 13:25
-
We cannot use this in work base, because we don't have Global admin rights Commented Jul 19, 2017 at 13:30
-
-
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? Commented Jul 19, 2017 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:
https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_queryall.htm
-
we used option QueryAll in QlikView connector and have error ALL ROWS not allowed in this context Commented Jul 20, 2017 at 9:46
-
-
@Oleg - Updated the link. Please update as answer to help others. Commented Jul 25, 2017 at 6:32
-