function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Dennis BoeltingDennis Boelting 

How can I remove a trigger by means of the developer console?

Hi,

I would like to remove a trigger in both production and sandbox by means of the developer console. 
Is this possible at all and if so, how can I do this?

Thanks
Dennis
pkpnairpkpnair

You can do this in the Set-up menu.
Type Trigger on the quick find box in the set up menu. Choose the trigger of the object that you want to delete. Click on the trigger name. You ge a delete button there on the page.  If you are refering to a custom object trigger, go to the objects list and get the trigger from there.

Arshadulla.ShariffArshadulla.Shariff

Hello Dennis,

You can delete in sandbox, but not possible in production.

The best way is inactive and remove or comment code in sandbox and make it inactive and deploy back to Production.

I hope this helps.

Thanks 

Dennis BoeltingDennis Boelting
Thanks for your response. If I delete the Apex trigger in sandbox how can I deploy this change to production? If I delete it how can I select this in the outbound package for the deployment? Dennis
Dennis BoeltingDennis Boelting
@Prakash: I understand how I can remove it in sandbox but how can I deploy this removal to production?
brahmaji tammanabrahmaji tammana
Hi Dennis,

PFB to understand how to delete a trigger from production.

https://help.salesforce.com/articleView?id=000006188&type=1

Sample package xml for apex class deletion and same will work for trigger:
 
<?xml version="1.0" encoding="UTF-8"?>
     <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
         <apiVersion>23.0</apiVersion>
         <status>Deleted</status>
     </ApexClass>

Thanks
Brahma