Print this page

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

For Example:

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

Note:
  • We can only use Workbench with proper admin permissions as Delete() is not a supported API call for Report object. Below is the Developer guide for reference: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_report.htm
  • Export the returned list of Report Id’s to a CSV file, then select the data. Delete in workbench and upload your CSV file. Click Map Fields to map the Id Field to the CSV Field of the same name. Leave Permanently hard delete records and Process records asynchronously via Bulk API deselected, then click Confirm Delete. The reports listed in your CSV are moved into your Salesforce Recycle Bin.

Tips:
Developer Console, does not support the Scope allPrivate, but the above SOQL Query can be used in other API tools like Data Loader etc.




promote demote