How to delete deactivate apex class trigger from salesforce production org
-
Upload
ashish-agarwal -
Category
Software
-
view
2.845 -
download
2
description
Transcript of How to delete deactivate apex class trigger from salesforce production org
How To
Delete / Deactivate Apex Classes & Triggers in Salesforce Production Org
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Trigger that Needs to be Deactivated
2
Trigger in Production Org that we will deactivating. Note that the trigger is
currently Active
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Apex Classes that Needs to be Deleted
3
Apex Classes in Salesforce Production Org. We will be deleting
these classes
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
Connect to Production Org using Force.com IDE
4
In Force.com IDE connect to your Salesforce Production org.
Click on File -> New -> Force.com Project
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 5
Enter the production org credentials. Click Next
Connect to Production Org using Force.com IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 6
Click Choose
Connect to Production Org using Force.com IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 7
You can either select all components or just the components that you want to delete / deactivate. Here we are just selecting the components that
we want to delete / deactivate
Download Components in IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 8
Click Finish
Download Components in IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 9
Expand the project folder and click on src -> classes. Double click on the “xml” file of the apex class. The xml file will be opened in
the right pane
In the xml file of the class, change the status from
Active to Deleted
Changed Status to Deleted in IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 10
Double click on the “xml” file name of the next apex
class that you want to delete. The xml file will be opened in the right pane
In the xml file of the class, change the status from
Active to Deleted
Changed Status to Deleted in IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 11
Double click on the “xml” file name of trigger apex class that you want to
delete. The xml file will be opened in the right pane
In the xml file of the trigger, change the status from Active to
Inactive. You can set it to Deleted, if required
Changed Status to Inactive in IDE
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 12
Click on Save All to save changes to Salesforce server
Save Changes to Salesforce
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 13
Once saved, validate from Salesforce UI that the apex
classes no longer exist in the Production Org
Verify that Apex Classes are Deleted
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 14
Also validate that the trigger has been deactivated
Verify that Apex Triggers are Deactivated
Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce
For Daily Dose of Useful Tips & Tricks on Salesforce.com visit asagarwal.com
15