You need to sign in to do that
Don't have an account?

Undeploy invalid code
Hi all,
I need to deploy a trigger to production environment. There are some invalid triggers and test classes in production environment. So if I run test for existing code this test will fail. But when I try to undeploy this invalid code Salesforce try to run tests for this invalid code.
So, is it possible to undeploy invalid code without running tests to it ?
Thanks!
It's seems that it's impossible. Because Salesforce always runs unit tests independently of what you try to do.
Thanks
yaa u right.but you can make those invalid triggers inactive so that it wont count under unit tests
But how can I deactivate it ?
Thanks!
I tried to do it using Eclipse IDE, but had no success.
In a sandbox, edit the Triggers you don't like, but clear out or comment out all the code; make them empty. Likewise for the test methods. Deploy all the empty code at once, and it shouldn't fail any tests, because there are 0 lines of code. Now they're toothless, and you can get rid of them at any time.
Jeremy
Jeremy,
Great, thank you!