How to Delete the Apex Triggers and Apex Classes from Production Salesforce Org?

Follow the below steps to delete the Apex Triggers and Apex Classes to Production Salesforce Org

Step1:
Use Force.com IDE to create a new project and download all apex triggers/ apex classes from production salesforce org.

Step2:
In the Apex Triggers ore Apex Classes you want to delete, open the metadata file for the respective Apex Class/Apex Trigger and change the status as “deleted”.

Step3:
Save to server
Observe the status of the class in the example below:

<?xml version=”1.0″ encoding=”UTF-8″?>
<ApexClass xmlns=”http://soap.sforce.com/2006/04/metadata”>
<apiVersion>23.0</apiVersion>
<status>Deleted</status>
</ApexClass>

Note:
1) You should try this technique in sandbox and become comfortable with it before attempting in production.
2) Double-check the class name before deleting.

Refer:
https://help.salesforce.com/apex/HTViewSolution?id=000006188

(12)

Written by 

I am Sakthivel Madesh, a certified Salesforce Developer & Administrator working on Salesforce Technology since 2011. I am currently working in IBM Austraila as Sr. Salesforce Developer. I have worked on multiple technologies Like PHP, Java, Salesforce, I am very passionate about Salesforce and to earn 10 Salesforce Certification. I love Trailhead for learning Salesforce Skill and Become a Trailhead Ranger too. I Love to Learn & Share my Salesforce knowledge to Salesforce Learners/Beginner using My Blog and Salesforce Community.

Leave a Reply