You need to sign in to do that
Don't have an account?
Deactivating a Bad Test Class and Bad Trigger in Production
Please tell me if this will cause an issue:
- Using Force.com IDE delete a bad test class (associated with a trigger in step 2) by changing status to deleted in the XML file and deploy from Force.com IDE
- All Apex tests will run in Production and when they validate will delete the test class
- Using Force.com IDE deactivate/delete a bad trigger in Production by changing the status in the XML file to either inactive or deleted and deploy from Force.com IDE
- All Apex tests will run in Production and when they validate will inactivate/delete the trigger
Just as an aside, that's the only way you can delete a trigger. If you have a test class that relies on a trigger, you cannot delete the trigger without first deleting the test class as the test class depends on the trigger. You can only delete a test class if the other test classes give enough code coverage afterwards. Once you delete the test class, the trigger that the test class relies on can now be deleted because it's not referenced anywhere anymore, and it doesn't contribute to the code coverage.
Follow these links for instructions:
https://help.salesforce.com/apex/HTViewSolution?id=000006188
http://www.salesforceben.com/way-to-delete-apex-classes-from-production/
https://sfdcfanboy.com/2017/11/23/a-tip-a-day-23-5-ways-to-stop-trigger-in-production/