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
SaleemBaba MohammedSaleemBaba Mohammed 

Unable to delete classes from production.

Hi all,

 

i am unable to delete classes from production even from esclipse IDE.

i am geting the error as "Remote delete failed with the following message. Delete will be aborted."

 

please suggest soon what is solution for the deleting the classes.

 

Thanks

Saleem

 

 

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard
How are you trying to delete the class? If you are simply selecting it from the production project and deleting, that will fail.

You need to delete the class from a sandbox and then deploy the classes folder to production - this will work out that the class has been deleted.

This thread has the full steps in the post marked as the solution:

http://boards.developerforce.com/t5/Apex-Code-Development/Delete-Apex-class-from-production/td-p/211489

All Answers

Vinit_KumarVinit_Kumar

The only way to delete Apex Class from prod is using eclipse IDE.As you are getting an error in doing so ,you can workaroud it by creating another class with same name in Sandbox with blank body i.e. you should not be doing anything in it.

 

Then,you can deploy the same to your prod which would override the existing classes.

bob_buzzardbob_buzzard
How are you trying to delete the class? If you are simply selecting it from the production project and deleting, that will fail.

You need to delete the class from a sandbox and then deploy the classes folder to production - this will work out that the class has been deleted.

This thread has the full steps in the post marked as the solution:

http://boards.developerforce.com/t5/Apex-Code-Development/Delete-Apex-class-from-production/td-p/211489
This was selected as the best answer