You need to sign in to do that
Don't have an account?
Antje
Disable Trigger
Hi,
I am new to the devolper side. So please be patient with me :)
I currently have two triggeres in production that do what they were designed to do. However, I will need to make some modifications to them, as they are screwing other things up. I know that I will have to use my sandbox for this but I can't seem to figure out how to deactive/disable them without deleting the triggers. I appreciate your help. Thanks
I am new to the devolper side. So please be patient with me :)
I currently have two triggeres in production that do what they were designed to do. However, I will need to make some modifications to them, as they are screwing other things up. I know that I will have to use my sandbox for this but I can't seem to figure out how to deactive/disable them without deleting the triggers. I appreciate your help. Thanks
All Answers
Please check below post. I hope that will help u:-
How do I disable a Trigger in a production environment?
https://help.salesforce.com/apex/HTViewSolution?id=000005417&language=en_US (https://help.salesforce.com/apex/HTViewSolution?id=000005417&language=en_US)
Important: You must consider the consequences of disabling a trigger in the production environment during work hours. It is highly recommended to perform this work outside normal business hours and to disable access to the application to non administrators during the maintenance period.
Follow these steps:
Disable the trigger on the sandbox environment
Create a new project in Eclipse using the Sandbox and including the trigger (or refresh your existing Eclipse project)
Alternative: edit the triggername.trigger-meta.xml in an existing project and change the status node to false: <status>Inactive</status>
Save the change locally
Deploy the trigger to productionComplete the data loadIf 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
Disable or delete an Apex Class or Trigger from a Production Organization
https://help.salesforce.com/apex/HTViewSolution?id=000006188
1. Force.com IDE should be installed.
2. Connect to the Sandbox Instance using the IDE and find the class or trigger that you want to delete.
3. Open the matching .xml file, and change the Status XML tag from Active to Deleted.
4. Or to disable the trigger change it to Inactive.
Note: Apex class Status can only be changed to "Active" or "Deleted," not "Inactive".
5. Save the file.
6. Select the two files (Code and XML) using "Ctrl-click," and then right-click on one of them.
7. Select Force.com | Deploy to server.
8. Provide your credentials for the Production org and follow the steps.
Please let us know if this will help u
Thanks
Amit Chaudhary
Step 1:- logged in sandbox
Step 2:- Open trigger and click on edit
Step 3:- Then click uncheck active check box. Your trigger will deactivate .
Step 4:- Then deploy trigger in production
Please let us know if this will help u
Thanks
Amit Chaudhary
I did that. When I deployed into production, I got an error message in my delpoyment status "
Code Coverage Failure
Your code coverage is 0%. You need at least 75% coverage to complete this deployment."
My code in my sandbox and production was at 100%. Once I unchecked the box that you are referring to, and I depoly, I got the error message above.
Thank You,
Antje