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
RstrunkRstrunk 

Can't deactivate Triggers in Production.

I ALWAYS GIVE KUDOS AND MARK SOLUTIONS AS SUCH

 

Hello all.

 

  I am having a very tough time trying to deactivate some triggers in production.  Details below:

 

We need to do an update on about 85000 case records.  I do not want triggers firing.  I created a changeset containing the deactivated versions of all case triggers.  When I click validate on the changeset, it fails because it says the code coverage is too low.  

 

So I assume that when a trigger is deactivated, it's code coverage no longer counts toward the org wide coverage.  Is there a way to force a deactivation of the triggers despite the coverage dropping below 75% for the org?

 

To me this seems like it would be a common issue, but I can't quite find any posts or resources on it.  

 

Any help would be greatly appreciated.  

SSinghSSingh

 

I would do something like this

 

1 - Create a custom flag TriggerFlag (Custom Settings can be used for this)

2 - Modify all the triggers to execute the business logic only if TriggerFlag is TRUE

3 - Modify your test cases accordingly -

 

When you have to update the Case records or any other record just turn TriggerFlag setting off :).

 

Hope this would be helpful !!

 

SS