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
Olivera MilevskaOlivera Milevska 

I need to deactivate an apex trigger in production

The apex trigger was created a few years back and it currently updates the contact owner when the account owner is updated. It is no longer valid. Can I have some steps to action please? 
Hi Olivera Milevska,
You can deactivate the trigger in sandbox and deploy the trigger to production .
One thing you need to keep in mind the inactive trigger will reduce code coverage percent, If you want to delete teh trigger then you can delete

Check below links to delete trigger from production.

Let me know if it helps !!
buggs sfdcbuggs sfdc
hey olivera,

step 1:--
First try to deactivate the same trigger in sandbox.
step 2:--
make a changeset of the deactivated trigger it and push into production org.
Note :-- You cannot deactivate the triggers directly in prodcution org
syeda syedasyeda syeda
Hi Olivera,

            we can stop/deactivate the trigger in live aslo. But before this you need to write a system label and also you need to write if condition in trigger related to system label if it is true/false and then you can deactivate trigger in live with this condition , please let me know if it would be helpful to you

Amit Chaudhary 8Amit Chaudhary 8
Turn off trigger in production org (
  • Disable the trigger in sandbox environment [You should have a sandbox org which contains the same trigger]
  • Create a new project in Eclipse using the Sandbox and including the trigger (or refresh your existing Eclipse project)
    • 1. Alternative: edit the triggername.trigger-meta.xml in an existing project and change the status node to false: <status>Inactive</status>
    • 2. Save the change locally Deploy the trigger to production
  • Complete the data load
  • If the change is not permanent or you want to enable the trigger again then enable the trigger by making it active on the sandbox or project again and deploy it to production

Check below post as well for more information

Let us know if this will help you
Yes, there are a number of ways to do it.  I have consolidated the list. 

5 Ways to Deactivate a Trigger in Production (
3 Ways to Delete an Apex class from Production (