Monday, August 11, 2014

How to delete a class in production in Salesforce?

How to delete a class in production in Salesforce?

1. Install Force.com IDE in Eclipse.

2. Connect to the Sandbox Instance using the IDE and find the class or trigger that you want to delete.

3. Open the matching .xml file change the Status XML tag from "Active" to "Deleted" if you want to remove the trigger or class, or to "Inactive" if you want to disable the trigger.

4. Apex class Status can only be changed to "Active" or "Deleted", not "Inactive".







5. Save the file.

6. Select the two files (Code and XML) using Ctrl-click, then right click on one of them. Select Force.com > Deploy to server.

7. Provide your credentials for the production org and follow the steps.





0 comments:

Post a Comment

 
| ,