function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
MoTownMoTown 

Deploying Nested Folders with And and the Meta Data API

I am using Ant and the MetaData API to retireve reports from a sandbox and then deploy them to another org.  LIghning now supports nested folders for reports and dashboards, Ant can retireve them and they are created in a hierarchical folder structure as you would expect.  However, I am finding that I cannot deploy them to another environment.  I get this error:
-- Error: An object [...]  of type Report was named in package.xml, but was not found in zipped directory
The file is there though.

Anyone else experiencing this and know of a work around.  I want to deploy the reports in nested folders, there would be far too many for me to move after the deployment and there is no way to move multiple reports or entire folders into another folder.

Thanks!

 
MoTownMoTown
I was able to figure this out on my own.
Although in the package.xml to extract the reports, you do not need to specify the full folder path to each report:
<types>
        <members>TopLevelFolder</members>
        <members>SubFolder</members>
        <members>SubFolder/Report1</members>
        <members>SubFolder/Report2</members>
		<members>SubFolder/Report3</members>
		<members>SubFolder/Report4</members>
		<members>SubFolder/Report5</members>
        <name>Report</name>
    </types>

In the package.xml of the deployment file, each report's location must be fully qualified which makese sense otherwise the system would not really understand how the hireachy is structured.  It would be better if the above snippet simply errored out.  By fully qualifying the location of all of the reports and folders, I was able to use the same Package.xml file for the retireval and deployment.
 
<types>
	<members>TopLevelFolder</members>
	<members>TopLevelFolder/SubFolder</members>
	<members>TopLevelFolder/SubFolder/Report1</members>
	<members>TopLevelFolder/SubFolder/Report2</members>
	<members>TopLevelFolder/SubFolder/Report3</members>
	<members>TopLevelFolder/SubFolder/Report4</members>
	<members>TopLevelFolder/SubFolder/Report5</members>
        <name>Report</name>
</types>

 
Nagen SahuNagen Sahu
Thanks for this post ! Exactly the problem i was facing.
Kyle OconnorKyle Oconnor
4 years later and this was still very helpful! Thank You!!