how to delete deactivate apex class trigger from salesforce production org

15
How To Delete / Deactivate Apex Classes & Triggers in Salesforce Production Org

Upload: ashish-agarwal

Post on 12-Jun-2015

2.845 views

Category:

Software


2 download

DESCRIPTION

How to delete / deactivate apex classes and triggers from Salesforce Production Org? This probably is the easiest way to remove unwanted classes & triggers directly from Salesforce Production Instance

TRANSCRIPT

Page 1: How to delete deactivate apex class trigger from salesforce production org

How To

Delete / Deactivate Apex Classes & Triggers in Salesforce Production Org

Page 2: How to delete deactivate apex class trigger from 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

Page 3: How to delete deactivate apex class trigger from salesforce production org

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

Page 4: How to delete deactivate apex class trigger from salesforce production org

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

Page 5: How to delete deactivate apex class trigger from salesforce production org

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

Page 6: How to delete deactivate apex class trigger from salesforce production org

Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 6

Click Choose

Connect to Production Org using Force.com IDE

Page 7: How to delete deactivate apex class trigger from salesforce production org

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

Page 8: How to delete deactivate apex class trigger from salesforce production org

Visit asagarwal.com for daily dose of useful tips & tricks on Salesforce 8

Click Finish

Download Components in IDE

Page 9: How to delete deactivate apex class trigger from salesforce production org

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

Page 10: How to delete deactivate apex class trigger from salesforce production org

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

Page 11: How to delete deactivate apex class trigger from salesforce production org

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

Page 12: How to delete deactivate apex class trigger from salesforce production org

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

Page 13: How to delete deactivate apex class trigger from salesforce production org

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

Page 14: How to delete deactivate apex class trigger from salesforce production org

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

Page 15: How to delete deactivate apex class trigger from salesforce production org

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