
How to deactivate a trigger in Salesforce using metadata
- Open up the metadata file for the trigger.
- If your trigger is called AccountTrigger then your metadata file will be called AccountTrigger.trigger-meta.xml
- Now set the status property to Inactive
- Once you deploy the file the trigger will be deactivated
Full Answer
How to deactivate a trigger in Salesforce?
Click edit next to the trigger you want to disable 5. Uncheck the Is Active checkbox 6. Hit save 7. Boom, your trigger is now deactivated If you want to deactivate a trigger in Salesforce as part of a deployment you can do it.
How do I enable/disable a trigger in a change set?
Create a new Outbound Change Set in the sandbox. Add the disabled trigger to the change set. In production, go to Inbound Change Sets and wait for the uploaded change set to be available. Click Deploy to run the tests and apply the changes. To see this information in video format, watch How to Disable a Trigger in a Production Org via Change Set.
Is it possible to deactivate a trigger in production?
In fact, there has to be a way to deactivate a trigger in production or it severely limits the use. I tried spaceman's method of deploying an inactive trigger and it still didn't work.
How do I Mark a trigger as inactive without deleting it?
Using Salesforce IDE/Eclispe, log into your sandbox instance 3. Go to your triggers that you marked as Inactive and deploy them to Production. This is the only way I've found where you can mark the trigger as INACTIVE without deleting them.

How we can deactivate trigger in production Salesforce?
Disable the trigger in a sandbox environment. You should have a sandbox org which contains the same trigger. Create a new Outbound Change Set in the sandbox....Turn off trigger in production orgAlternative: edit the triggername. trigger-meta. ... Save the change locally.Deploy the trigger to production.
How do I disable a trigger in Salesforce Sandbox?
You can Inactive the trigger using following steps:Login to the sandbox.Go to the Trigger and Click on Edit and Uncheck the IsActive box (see the screenshot), and Click on Save.Create a Change Set and include the Trigger in the changeset and deploy the same into the Production.
Can we delete Apex trigger in production?
Apex classes and triggers cannot be deleted from a Salesforce production declaratively, unlike in sandbox orgs. This is because security for Apex in Salesforce production orgs is greatly increased.
How do I disable trigger using custom settings?
All you need to do is setup a hierarchy custom setting object by going to Setup -> Custom Settings and then create Checkbox (Boolean) fields for each object you have a trigger for that you may want to bypass.
How do you stop trigger execution?
DEACTIVATE THE TRIGGER Deactivate your trigger in your sandbox by unchecking the Active checkbox of the trigger. Create an outbound change set, upload and deploy the change set to production. Tadah! The trigger in production will be deactivated.
How do I disable a trigger in Test class in Salesforce?
If you want to default the trigger to off, have your handler set bypassTrigger = Test. isRunningTest() . That way, you can still toggle it on/off when you run certain tests in your suite.
How do I disable apex?
Probably the simplest way to delete / disable is to connect to your Salesforce production org from VS Code download the apex class / trigger, change the status of the Apex class / trigger to “Deleted” or “Inactive” in the class/trigger XML file and save.
Can we delete Test class in production?
You cannot delete a class in production directly. You will need delete the class from your sandbox and then deploy the deletions to your production org.
What is the difference between trigger and a workflow?
Trigger works before and after some actions,Coding is required. Workflows work only after some actions, Coding is not required. Workflow is automated process that fired an action based on Evaluation criteria and rule criteria.
How do I disable triggers for a particular user?
Uncheck the Active checkbox to disable a Trigger Handler and the Apex class associated with it. For all NPSP-packaged Trigger Handlers, check the User Managed checkbox to prevent the Trigger Handler from re-activating during the next update of the package.
How do you mute triggers?
0:113:07How to Disable a Trigger in a Production Org via Change SetYouTubeStart of suggested clipEnd of suggested clipClick setup type trigger and click on Apex trigger under custom code locate the trigger and clickMoreClick setup type trigger and click on Apex trigger under custom code locate the trigger and click Edit uncheck the is active checkbox click save you can also alter the code to make it inactive.
Can we deactivate managed package trigger?
We can't deactivate managed package triggers. Check hierarchical custom setting in a managed package if there is a way to enable/disable any functionality.
Thursday, December 22, 2016
In certain circumstances, we need to deactivate trigger temporary or permanently. But, if you open the trigger in Salesforce production environment, you will not see Edit and Delete button.
Salesforce: deactivate Trigger in Production
In certain circumstances, we need to deactivate trigger temporary or permanently. But, if you open the trigger in Salesforce production environment, you will not see Edit and Delete button.