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

Class cannot be saved inactive
Hi There,
I need to deactivate a trigger and it's test class through Eclipse with the Force.com plugin.
If I edit the meta file and set the state to inactive and try to deploy I get the error 'Class cannot be saved inactive'.
Can anyone advise on how to do this?
TIA
I need to deactivate a trigger and it's test class through Eclipse with the Force.com plugin.
If I edit the meta file and set the state to inactive and try to deploy I get the error 'Class cannot be saved inactive'.
Can anyone advise on how to do this?
TIA
Thanks for your reply.
My meta file uses the <status> tag which I have set to Inactive (as the options allow). Eclipse will not let me deploy this. All I get is the error 'Class cannot be saved inactive'. I think this may be different to yours, maybe a different version of the api? I am using 13.0.
Has anyone else got any idea?
Thanks
Yes I agree that I need to do it in the sandbox first. But I can't see how to do that. If I look at the class in the sandbox through a browser I cannot see anyway to deactivate the class.
I clicked on Edit and unlike with triggers there is no checkbox for toggling activity.
Sorry if I'm being stupid and missing something obvious.
Thanks
1. Delete your trigger.
2. Comment out all code in your trigger and your test class.
3. Remove permissions for all users against this trigger. This effectively disables it.
All very poor solutions. I hope they fix this bug soon.
Good luck!
Ben
I am having a similar issue. I am trying to disable a trigger that is causing errors during mass updates. When I set the status to "False" on the trigger XML, and run the tests... I get an error because the tests fail. When I change the status on the trigger itself, I don't get an error, but I can't deploy it.
When I comment out the trigger, run tests, and deploy... no change is made to the code. Eclipse doesn't even see that the trigger has changed when deploying. It is like the comments are ignored.
Anyone have any other suggestions or tips for disabling a trigger using these suggestions? I know that I am missing something.
Thanks!
Message Edited by jhamlet on 11-24-2008 03:00 PM