3

I have to delete around 1000 reports reside in different folders.I know how to delete it with Eclipse. As per i know, I have to create a XMl of all these reports and then use destructive xml to delete all the reports. However, I am confused in how to make xml for all 1000 reports. Do I need to select all 1000 reports manually to create a xml for them ? Please suggest.

5
  • If the no of reports to delete is huge number than to retain.I would take back up of reports i need in another developer sandbox(config only) and delete all at a shot using destructive xml of * notatation and then deploy just the needed ones – Mohith Shrivastava Oct 14 '13 at 9:22
  • In destructive xml also you will need to specify the names or you have option to use * to delete all – Mohith Shrivastava Oct 14 '13 at 9:23
  • There are about 9000 reports in the ORG. :( . I have delete around 1000 reports in them... – amidstCloud Oct 14 '13 at 9:34
  • 1
    unfortunate that now this will be manual activity.As even in destructive xml you will need to specify names – Mohith Shrivastava Oct 14 '13 at 9:40
  • @MohithKumar you should post that as an answer. – Mike Chale Oct 14 '13 at 12:21
2
<?xml version="1.0" encoding="UTF-8"?>
  <Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
    <members>MyReportFolder/MyReportName</members>
    <name>Report</name>
</types>
<version>29.0</version>

In destructive XML you will have to unfortunately specify either report folder name or report name .IF you need to delete all reports of a folder ,specifying member as report folder name will do the job and if in case you wish to delete only few reports then specifying report name is the only option

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

In order to deploy the destructive changes, you must also have a package.xml file that lists no components to deploy, includes the API version, and is in the same directory as destructiveChanges.xml:

<?xml version="1.0" encoding="UTF-8"?>
  <Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <version>29.0</version>
 </Package>
2
  • 1
    Thanks Mohith. One more thing, instead of selecting the all reports manually and creating xml with eclipse.We can create the XML members with excel Text function by just adding column values with some string. – amidstCloud Oct 15 '13 at 15:18
  • good use of Excel! – Mohith Shrivastava Oct 15 '13 at 15:38

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.