You need to sign in to do that
Don't have an account?
JohanLiljegren
Deactivating triggers in Production? Sure you can!
In need of deactivating a trigger in Production? Haven't found a way to do it?
I don't know if people are aware of this, but I've seen numerous posts about it, I've suffered from it myself and even had support tell me it's not possible.
So I was a bit surprised when today, playing around in Eclipse, I successfully managed to deactivate and activate a trigger in Production!
What you need to do is to open the metadata file accompanying the trigger. So, if your trigger is Foo.trigger, you would have a Foo.trigger-meta.xml.
Open that one, change the value of the element <active> to "false" and save the file.
Once saved, doublecheck through the GUI and the checkbox for Active is no longer there!
Sweet!
Of course, to re-activate the trigger, just change the <active> element to "true" again.
Hope this helps someone.
//Johan
I don't know if people are aware of this, but I've seen numerous posts about it, I've suffered from it myself and even had support tell me it's not possible.
So I was a bit surprised when today, playing around in Eclipse, I successfully managed to deactivate and activate a trigger in Production!
What you need to do is to open the metadata file accompanying the trigger. So, if your trigger is Foo.trigger, you would have a Foo.trigger-meta.xml.
Open that one, change the value of the element <active> to "false" and save the file.
Once saved, doublecheck through the GUI and the checkbox for Active is no longer there!
Sweet!
Of course, to re-activate the trigger, just change the <active> element to "true" again.
Hope this helps someone.
//Johan
So I'm still left with commenting out the code and then deploying an active (if impotent) trigger to production.
Of course, i would never develop a trigger in Production. I don't even think that's possible, is it?
//Johan
as far as my comment, i referred to editing triggers in production more generally, not just your workaround.
that is actually how i had to activate my trigger, so i know the pain there.
<?xml version="1.0" encoding="UTF-8"?>
<ApexTrigger xmlns="http://soap.sforce.com/2006/04/metadata">
<active>false</active>
<apiVersion>10.0</apiVersion>
</ApexTrigger>