How to delete Reports and Dashboard from a Personal or a Private Folder
|Knowledge Article Number||000240059|
|Description||How to find or delete Reports and Dashboards saved in a personal or a private folders?|
|Resolution||Prior to Spring'16, there was no way to delete Reports and Dashboards saved in users Personal or Private Folders.
User Permission: Manage All Private Reports and Dashboards.
Use all the Private query scope to find and delete Reports and Dashboards saved in Private Folders.
1) Login to Workbench and run a query to return reports saved in users Private Folders which haven’t been run for more than a year.
SELECT Id FROM Report USING SCOPE allPrivate WHERE LastRunDate < LAST_N_DAYS:365
2) You can also query reports saved inside a specific user's private folder:
SELECT Id FROM Report USING SCOPE allPrivate WHERE OwnerId = '005A0000000Bc2deFG'
3) To return the Owner name, or whether a user is inactive, turn on "Allows SOQL Parent Relationship Queries", then run the following query to get a list of all reports in the private folder of any inactive user:
SELECT Id, Owner.Name FROM Report USING SCOPE allPrivate WHERE Owner.IsActive = false
Developer Console, does not support the Scope allPrivate, but the above SOQL Query can be used in other API tools like Data Loader etc.