I'm trying to cleanup our reports and am wanting to add a folder and drop all the unused reports in it for our execs to review. Thought it would save some time by utilizing force.com IDE and testing the process in our sandbox. So far, I am unable to get my downloaded metadata/ project to sync updates to or from the server. Does anyone know of similar issues and or workarounds?
Are you getting some kind of error? Does it just hang indefinitely? Hard to say without more details so just check these hints in no particular order:
There's a limit of max 5,000 items obtained in one retrieve / deploy session. If you suspect there are tons of reports in one of folders you're refreshing you'll have to somehow split it up. You can check the count of items in each folder with a query, for example
SELECT Count(Id), OwnerId FROM Report GROUP BY ROLLUP(OwnerId)
(there will be 3 types of Ids - your own User Id to indicate "my personal custom reports", real folders' Ids and the Organization id to mark "unfiled public reports")
Eclipse is known to throw weird errors, for example Unable to refresh src from server using force.com IDE For me it happens after I create new project (it's created OK but can't retrieve any files). I need to close it, open up (sometimes with "run as administrator") and then it works OK... but this might be a "cargo cult" and indeed tips like swith workspace might be the simple solutions.
If it hangs on "Add/Remove Metadata components" you might decide to edit your
package.xmlby hand (it's not rocket science), maybe even create subfolders of the "reports" directory and refresh only them by right-clicking directly instead of on whole "src". Sample section might look like that
<types> <members>Operations_Reports</members> <members>Operations_Reports/Order_Count</members> <members>Operations_Reports/Commitment_Pie_Chart</members> <members>IT_Reports</members> <members>IT_Reports/Open_IT_Cases</members> <name>Report</name> </types>
If you're retrieving data and Eclipse seems to be hanging - does the
[workspace]/.metadata/.logfile contain anything useful? If you're deploying - monitor deployments in the Setup?
- Running Eclipse with more memory? Disabling plugins / features you don't use at the moment (Maven tasks for example). Suppress antivirus for a while?
- Maybe you're doing it wrong ;) Examine the
LastRunDatecolumn... you should be safe notifying users that you'll delete anything that was not touched in 1+ year (well, check if anybody has some reports he accesses only near the year's end ;)), wait a bit and delete right away without moving them around? This table does not support delete operations so you'd be either looking at destructive deployment, tons of manual clicking or a cheat like accessing
Just a quick update as I was able to discover why I was unable to get report folder cleanup actions to refresh to our sandbox. The following is bullet list of the steps I took (thanks for all your advise too).
Creating a folder in force.com IDE
- Create folder in Workspace
- Duplicate one of the Folder-meta.xml files
- Rename meta file to your folder name
- Refresh your Workspace
- Open meta file in IDE
- Change meta file
<name>YOUR FILE NAME</name>xml node to your file name (save file)
- Refresh your Workspace
- Now you should see your new folder in your Sandbox
Move files from one folder to the next within the same directory
Within your Reports directory's package.xml you have to remove the file children nodes listed, otherwise it will also not synchronize with sandbox, and you will get a sync error showing the offending xml areas that need to be changes.
<member>child file #1</members>
You don't however have to update the children nodes on the receiving folder as the IDE updates that on refresh.
Additionally, if you remove a folder in your Workspace you have to remove the cooresponding yourfolder-meta.xml file
then when you do a refresh it updates your sandbox.
Also I was able to hide folders or change sharing through defining it in the folder-meta.xml file (which I won't get into here, you can see the nodes in the IDE and configure accordingly).