Tuesday, June 12, 2012

Migrate Reports from Salesforce Production to Production Using Ecplise

When moving from Sandbox to production you have the option of using change sets to quickly move reports, objects, triggers, classes ect. to a production enviornment. I was posed the problem of moving a number of reports from one Production Org to another Production Org that would have the same fields and same configuration.

With production org's not able to connect to other production org's via change sets I had to get creative, here is what I did.


CAUTION: When handling metadata components from a production enviornment in eclipse you must be VERY careful as you can screw things up in a hurry! I suggest playing around with this in a developer org before doing anything in production.



  1. Connect Eclipse to the production environment of both org's.
  2. When downloading a project in Eclipse, be sure to select all metadata components.
  3. One of your folders will be Reports.
  4. Open up the report you want to recreate. It will open a window, at the bottom of the page change your option from 'Design' to 'Source'
  5. In the instance you are going to migrating the report right click on the report folder where you want the report to appear, hover over 'New' and click the 'Other..' option.
  6. Under the 'XML' folder click 'XML' then 'Next'
  7. You can give the report the same name as the one being copied, so 'SampleReport.report' would work.
  8. Next you need to copy the XML code from step 4 and paste it into this new XML file you have created. 
  9. NOTE: if the fields that are in the report are not consistent between the org's you will get errors
  10. Finally click save, then right click on the report folder and select 'Force.com' > 'Save to Server' and that's it!