Home SALESFORCEDeployment Retrieve Unfiled Public Reports using Salesforce Package.xml

Retrieve Unfiled Public Reports using Salesforce Package.xml

For retrieving and deploying Salesforce Report Using Package.xml, following are mandatory.

  • Report Name (Developer Name)
  • Folder Name (API Name) – Public Folder should be unfiled$public

Example:

to retrieve Salesforce report from Unfiled Public Reports folder, then use the folder name as unfiled$public:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>unfiled$public/Case_Created_by_Today</members>
<name>Report</name>
</types>
<version>46.0</version>
</Package>

Retrieve Report from Different folders then specify the folder name and followed the reports like below:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>ExtraReports</members> <! - Report Folder ->
<members>ExtraReports/AnyOccupation</members> <! - Report from ExtraReports->
<members>unfiled$public/SampleReport</members> <! - Report from Unfiled Public Reports ->
<name>Report</name>
</types>
<version>46.0</version>
</Package>

Retrieve All Salesforce Report using Package.xml, its not possible and can’t use the “*” wildcard on Report metadata components like below:

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>Report</name>
    </types>
    <version>46.0</version>
</Package>

Other workaround to achieve to retrieve all reports using package.xml,

Require “Developer Name” of the Report and “Folder” Name of the Report, so use below SOQL query to retrieve all your reports using Developer Console/Workbench:

SOQL Query to Retrieve all your reports in your Salesforce ORG:-

SELECT Name, DeveloperName, FolderName FROM Report

Then form your package.xml to retrieve all your reports.

Note:
– Reports stored in “Public folder”, just use the Metadata API as “unfiled$public” in your package.xml
– Private Reports (i.e My Personal Custom Reports) cannot be retrieved using Metadata API.

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

Bulk Move Reports or Dashboards Using the Metadata APIhttps://dreamevent.secure.force.com/articleView?id=bulk_move_reports_dashboards.htm&type=0

You may also like

Leave a Comment