Failed delete of files removes from project - restore steps clunky

Issue #1215 duplicate
Eric Kintzer created an issue

Use case:

Delete Foo.class and Foo.page Get error: Delete From Server Failed

ERROR deleting ApexPage pages/Foo.page: The page you have tried to delete is currently being referenced by a page, custom link, button, web tab, dashboard, SoftPhone layout or custom sidebar component. Please delete the reference before deleting the page.

ERROR deleting ApexClass classes/Foo.cls: This apex class is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Visualforce Page - Foo.

So, root cause is that the VF page is referenced on a custom tab and developer didn't know that in advance

The developer then has to:

  • Delete the custom tab (from either org or from project if custom tabs happen to be in the src folder)
  • use IC2 Retrieve Metadata to restore the class/page to the Project
  • Use RMB rebuild 'classes; and RMB rebuild 'pages' to get the not-really deleted files back into the Project tree view
  • repeat the file deletion from the project view to truly delete in the org

Seems to me that if the deletes fail, IC2 should restore them to the project view as the recovery steps are clunky.

Comments (4)

  1. Log in to comment