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
CSchaezCSchaez 

Removing/Deactivating Apex triggers

I have no idea how to remove or deactivate a trigger that is deployed to production... Everything I have is working properly right now, but I worry that if something goes wrong and freezes a system, I won't be able to remove my code. Could someone walk me through the process?

 

Thanks!

Charlie

BritishBoyinDCBritishBoyinDC
Do this in reverse...
JavajJavaj

You can de-activate the trigger through ANT tool and eclipse.

In Ant Tool 

while deploying trigger you can see the  YOURTRIGGERNAME.trigger-meta.xml file.

 

 

<?xml version="1.0" encoding="UTF-8"?>

<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">

    <apiVersion>15.0</apiVersion>

    <status>Active</status>

</ApexTrigger>

 

Just change to   <status>InActive</status> 

 

 To remove the trigger from Production Eclipse have very simple method,

Just right click on the trigger name delete it and deploy to server.