How to delete or deactivate apex class / trigger in Salesforce Production

Unlike the Developer Edition and the Sandboxes where we can simply click on delete or uncheck "Is Active" and delete/deactivate the Apex Class/Trigger,
production does not allow us to do so.
How to delete or deactivate apex class/trigger in Production.
1. Using Eclipse
Import the org in eclipse.
Open the .xml file of the Class/Trigger
Change "Status"
Trigger: "Active" to "Inactive"
Class: "Active" to "Deleted"
Save the XML.
2. Deployment from sandbox
Make changes(Eg: Comment the lines) in your sandbox and deply to Production.

Comments

Popular posts from this blog

Cascade deleting too many records