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
Rafa_SRafa_S 

Using Force.com IDE to delete metadata objects (reports, dashboards & views)

Hi;

 

I've been googling all over the place and found that you can supposedly mass delete reports using the IDE.  Since I used it a month ago to blow up some Apex classes, I decided to give it a try and "destructively remove" a bunch of garbage reports and dashboards my org inherited ( thinking I'd try views  right after :-?  )

 

After waiting almost an hour for the query so finish polling the selected metadata (about halfway through the list of reports), I selected a couple and hit DELETE.  The IDE asks if I want them deleted on both sides, I select yes and the report folders are not listed in the IDE anymore.  -So far, right as the couple blogs I googled state it works.

 

Then I'd go to my org in the browser, search for the report folders.... and there they are !

I selected  just one and hit Delete. Nothing either.

 

So it didn't delete. Alright, perhaps I should save the src folder with the server ??? Nope. Doesn't do anything but show useless prompts.

 

Perhaps sync with server ? That takes me to the Sync Team screen, where I delete again,   re-sync and .... Nothing. My indestructible SFDC reports are still there.

 

So I finally read that the forcecom literature states that the 'package.xml'  file must be renamed to 'destructive changes.xml'... Right.... "Renaming not supported in this IDE, go use Salesforce" !!!

 

It might be extremely evident how frustrating this is for me. I would apreciate it a lot if someone shows me what the correct procedure is nowadays since what I found in the web posts doesn't work at all.

 

Thanks in advance

 

 

 


sfdcfoxsfdcfox

Don't use Eclipse for this sort of work... go with the Ant toolkit. It's the same folder structure as Eclipse (you can literally copy-paste it into a new directory, if you like), and make a destructiveChanges.xml file to blow away whatever elements you'd like.

Rafa_SRafa_S

I've read about ANT.  Not much though.  

 

Do you mean the Migration Toolkit ?

 

Thanks for the suggestion

 

sfdcfoxsfdcfox

That's the one. You'll need Apache Ant, the library drop-in, and a little bit of patience learning how to get it just right. It's not that bad, though. You can get started in Setup > Develop > Tools.

Rafa_SRafa_S

I'll give it a go, and post back if it worked.

 

Have you ever tried a massive view deletion ?

sfdcfoxsfdcfox

I've only once had a need for it, and I wrote a JavaScript/AJAX solution back then. I don't have it any longer, though (nor would it work, as they've since added CSRF checks). My understanding is that it does work as advertised on the tin, though.

Mitesh SuraMitesh Sura
I know this is old post but here is good article if somebody wants to try ant scripts within Eclipse IDE: http://adminmoon.com/mass-delete-metadata/