Question:
How to access and delete a report created by a user that is stored in a private folder.
Answer:
Before accessing the report, Enable Access Levels for Sharing Report and Dashboard Folders is enabled using the following steps:
- Navigate to: Setup --> App Setup --> Customize --> Reports & Dashboards --> Folder Sharing.
- Enable the Enable Access Levels for Sharing Report and Dashboard Folders option.
- Click Save.
Workbench or another SQL querying tool is used to gain access to private reports. Querying on the report object, while using the allPrivate scope, returns private reports. Two example queries are listed below:
- Reports in private folders that have not run in the past year:
SELECT Name,FolderName,Owner.Name,Owner.isActive,Id,LastModifiedDate,LastRunDate
FROM Report USING SCOPE allPrivate WHERE LastRunDate < LAST_N_DAYS:365
- Reports in an inactive user private folder:
SELECT Name,FolderName,Owner.Name,Owner.isActive,Id,LastModifiedDate,LastRunDate
FROM Report USING SCOPE allPrivate WHERE Owner.isActive = false
Related Documentation:
N/A