You need to sign in to do that
Don't have an account?
karthi_queries
How to disable apex class
Hi All,
I'm trying to disable apex class in my sandbox, i didn't find the way to deactivate this.
Appereciate your help.
Regards,
Karthik
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi All,
I'm trying to disable apex class in my sandbox, i didn't find the way to deactivate this.
Appereciate your help.
Regards,
Karthik
Are you using the Force.com IDE? If so, you can edit the associated -meta.xml file and change the status attribute to Inactive.
bob_buzzard,
I just tied your suggestion, but the IDE won't allow me to save the change back to the server -- I get the "dirty" error on my .cls file after saving the change to the .cls-meta.xml file, and I confirmed via the UI that the class was still listed as active. Any other action I should be taking?
That sounds like you are trying to save directly to production, which isn't allowed. You'll need to disable it in a sandbox and deploy the disabled class via eclipse IDE or change sets.
Nope, I'm trying to save to a Sandbox org -- just tried again, and still got the same "dirty" error.
Ah - dirty may mean that the code has changed underneath you and thus your changes would conflict with the version on the server. While you should be able to apply the changes through the synchronize perspective, I've not had much success going that route in the past.
What works for me is:
Copy your code to notepad or similar
Refresh the class from the server (right click, Force.com submenu -> refresh from server)
Re-apply changes and save.
Hi Bob,
Can you post the meta.xml because i am new to eclipse.
Thanks
Hi Bob,
I am change the status as inactive in meta.xml. i am getting error when i deploy the class. I am getting the error as' class can not be saved inactive'.
If i change status inactive to false i am getting error as 'invalid version'. Can you please help me out. Thanks in advance.
Thanks,
cmdloader.