+ Start a Discussion
Suneel14Suneel14 

Not able to inactive class from Eclipse

Hi ,

 

I have created a class in sand box without test class and it is working properly but as per the my requirement I want to inactive this class for a while but I am not able to do it it is throwing error.

 

Best Answer chosen by Admin (Salesforce Developers) 
nick1505nick1505

Hi, 

 

You cannot make a class as inactive. You can only achive it in case of trigger's. 

Please check the below Link:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexclass.htm

 

If you dont want to use the class..you can comment the whole code inside the class. Hope this works for you.

 

Thanks,

 

 

All Answers

nick1505nick1505

Hi, 

 

You cannot make a class as inactive. You can only achive it in case of trigger's. 

Please check the below Link:

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_apexclass.htm

 

If you dont want to use the class..you can comment the whole code inside the class. Hope this works for you.

 

Thanks,

 

 

This was selected as the best answer
sanjdevsanjdev

Hi 

 

Open the .cls-meta.xml of the class that you want to make Inactive. You will see a Status field with value as Active. Select Inactive from the Picklist and save it.

 

The class will be Inactive now.

 

Hope this helps you.

 

Cheers

Sanj

Suneel14Suneel14

Hi nick,

 

Thank you !! 

Suneel14Suneel14

Hi Sanjay,

 

Nick is correct we can not inactive class from eclipse we can only inactive trigger.. Please check the link send by nick

 

Thank you!