7

The salesforce documentation says:

How do I disable a Trigger in a production environment?

You must consider the consequences of disabling a trigger in the production environment during work hours. It is highly recommended to perform this during off-hours. Also, disable access to the application to non administrators during the maintenance period.

Question

  • What are the consequences of disabling a trigger in the production environment that are mentioned in the documentation?

  • Are there different consequences in a production than a sandbox org?

  • The consequences of disabling X, are ... unsuprisingly... that X does not work anymore, the downstream consequences of that are whatever might depend on X working could be affected. – Brad Thomas Oct 6 '16 at 20:57
  • Hi Brad. You are right that it depends on what the functionality is. But from a business point of view you want to know what are all the potential risks so that you can mitigate all the risks. – Christian Deckert Oct 7 '16 at 13:19
7

The consequences can be anything depending upon the business logic written in the trigger. For example -

  1. if a business logic is supposed to update fields, the updates will fail
  2. If the business logic is supposed to call a different system and get the data in Salesforce, it would fail.
  3. If business logic is supposed to send email, it might fail.

Bottomline : Any business logic written inside the trigger will not execute. The best practice would be to analyze the underlying logic and find out the impact. Infact disable the trigger in sandbox first to understand the impact.

3

I talked to salesforce Support the support wrote:

  1. During work hours, large no of users try to access the data, if you will disable the trigger and trigger were related of any of the events then the functionality stop working in production. Functionality like update the field, send an email, create a new record etc. which are executed by this trigger, all those functionalities is not working in production.

  2. If any batch will be scheduled for a specific time for insert/update/delete functionality and if the trigger was related any of the functionality, stop working in production and might be its cause the error.

  3. After disabling the trigger your functionality like, update the field, send an email, create a new record etc will not work. So might be It's affected your scheduled reports.

  4. If the trigger is calling from another trigger handler class so after disabling the trigger its cause the error in a production environment.

Consideration:

  • Please check the functionality of trigger.
  • Please check the batch jobs which is related this trigger also please check all the dependencies of the trigger.
  • Please try to perform this functionality during off-hours because no of users is less and the probability of hitting any issues would be less.
  • Please create a debug logs after disabling the trigger, so you can easily find the error if its occurs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.