You need to sign in to do that
Don't have an account?
Zoom_V
De-activate Apex Class in Production
Can I de-activate an Apex class directly in the production environment ? Right now I have some classes which are preventing me from deploying a change set because of some errors which I am getting them. The class is no longer being used in the production environment, so I would like to de-activate it - or do I need to do it through a change set ?
If I de-activate the classes in question will that be good enough for me to then have a successful change set deployment ?
Thank you for your help.
This is another weird thing about Salesforce - you cannot edit/delete/deactivate classes directly in production.
If you want to make any changes to a class deployed in PROD, you need redeploy it, with the changes.
For e.g., as Tech Force said, you can deploy your class via Eclipse, setting the status to InActive. You can also redeploy the class with all it's code commented out, which will get rid of the errors you are getting during deployment.
Usually, I would advise deleting the class - you can delete the class from your eclipse project, and then re-deploy, in which case it will allow you to delete it.
All Answers
This is another weird thing about Salesforce - you cannot edit/delete/deactivate classes directly in production.
If you want to make any changes to a class deployed in PROD, you need redeploy it, with the changes.
For e.g., as Tech Force said, you can deploy your class via Eclipse, setting the status to InActive. You can also redeploy the class with all it's code commented out, which will get rid of the errors you are getting during deployment.
Usually, I would advise deleting the class - you can delete the class from your eclipse project, and then re-deploy, in which case it will allow you to delete it.
Thank you very much for your responses you guys. I ended up going into Eclipse and changing the XML setting to "Deleted". That did the trick.
Salesforce needs to get that feature for classes.
Thanks again.