Print this page

How do I disable a Trigger in a production environment?

Knowledge Article Number 000005417
Description

In general, triggers are not editable once deployed to production org. However, in certain circumstances there might be a need to disable triggers in production.
 

Resolution

NOTE: 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.

Following are the steps to deactivate 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




promote demote