5

Is there a way to create a package.xml contains all reports through Code.? I have tried listMetadata also, but could not create the xml with all the reports.

  • listMetadata requires a known folder name, so you need to enumerate the folders first, which it seems cannot be done via listMetadata, though can be queried via SOQL. Are you using Ant or Java here? – Andrew Fawcett Aug 19 '13 at 15:35
  • I'm using Ant here. I want to write a .bat file to take back up of reports automatically. In time, if new reports has been added,how can i update the *.xml. – amidstCloud Aug 20 '13 at 6:21
2

You can't use the "*" wildcard on Report metadata components so the answer above is inaccurate.

You have to list out each member with FolderName/ReportName for each. The article below from Salesforce's Metadata API guide speaks to more dynamic ways to accomplish this, but it's a little beyond my understanding at the moment.

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_report.htm

1
<types>
    <members>*</members>
    <name>Reports</name>
</types>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.