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
lwlw 

Cannot find folder error occures when trying to deploy reports

I am trying to deploy a project from IDE to a new ORG. It worked before (last year). I haven't changed package.xml since then. Could anyone suggest me how to fix this problem?

The errors are as follows:

dashboard2/name1/name1.dashboard name1/name1 : In field: report - no Report named name1/new_report found reports/name1/new_report.report name1/new_report: Cannot find folder: name1

Package.xml:

<types>
<members>name1</members>
<members>name1/name1</members>
<name>Dashboard</name>
</types>

<types>
<members>name1</members>
<members>name1/new_report</members>
<name>Report</name>
</types>

In src folder, there are:
dashboards/name1/name1.dashboard
dashboards/name1/name1_en.dashboard
reports/name1/new_report.report

name1-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<accessType>Public</accessType>
<name>name1 Dashboards</name>
<publicFolderAccess>ReadOnly</publicFolderAccess>
</DashboardFolder>

<?xml version="1.0" encoding="UTF-8"?>
<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<accessType>Public</accessType>
<name>name1 Reports</name>
<publicFolderAccess>ReadOnly</publicFolderAccess>
</ReportFolder>
 
Sampath KumarSampath Kumar
Hi lw,

Can you please check is there any folder by name 'name1' in the target and also the user who is performing deployment having access to the folder?

Regards
Sampath Kumar Goud
Srinivasaragavan JayakumarSrinivasaragavan Jayakumar
The folder and dashboard meta data file should have the Name similar to the folder name.


name1-meta.xml
<?xml version="1.0" encoding="UTF-8"?>
<DashboardFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<accessType>Public</accessType>
<name>name1</name>
<publicFolderAccess>ReadOnly</publicFolderAccess>
</DashboardFolder>

<?xml version="1.0" encoding="UTF-8"?>
<ReportFolder xmlns="http://soap.sforce.com/2006/04/metadata">
<accessType>Public</accessType>
<name>name1</name>
<publicFolderAccess>ReadOnly</publicFolderAccess>
</ReportFolder>
Danny SalvadoriDanny Salvadori
This fixed my similar problem. This is an important tip. How are we supposed to guess that a folder needs meta-data!