Tracking Salesforce Reports in your package.xml

Jake Tripp
2 min readDec 18, 2018

--

Someone, somewhere out there is suffering because their company has multiple Salesforce environments and every time they update reports, they have to update/recreate the reports in all of the environments.

Maybe you’ve been told that you can’t track reports, only report types.

Maybe you’ve tried and given up.

I, along with my coworker, Joel, found out how and I thought I would share it.

Let’s be honest, the documentation for this (at the time of writing) is non-existent or blatantly wrong.

Lucky for you, we tried a brute force approach and just tried all of the naming conventions we could think of. Behold, the correct format:

Folder Name: Jake Music

Report Name: Top one hundred songs

Format:

// the folder name smushed together
// then a slash
// then the UNIQUE report name (which has underscores in it)
JakeMusic/Top_one_hundred_songs_m18fhi

NOTE: You can find the unique report name by opening up the report, pressing edit, and then clicking the triangle next to the save button and then properties.

Also NOTE: You can’t deploy reports to a folder, you can only deploy to the public folder. We need the reports to be in a folder for my company (which is a little painful).

So the workflow is:

  1. Make the folder in your dev environment
  2. Make the reports in your dev environment and save them in your folder
  3. Pull the reports down locally using the steps above
  4. Now rename your local folder to be “unfiled$public”
  5. Now deploy your work to the new environment
  6. Now make the folder in your new environment
  7. Now move the reports from the public folder to your folder in the new environment.

Sample package.xml snippet:

<types>
<members>unfiled$public/My_first_unique_report_mas8</members
<members>JakeMusic/My_second_unique_report_ask98</members>
<name>Report</name>
</types>

Note that the first report in the unfiled$public folder and the second is in a personal folder. The public folder can be used for pushing or pulling. The personal folder can only be used for pulling.

If this helped you or if you have any better ideas, drop a comment below!

--

--