+ Start a Discussion
Jordan@BracketLabsJordan@BracketLabs 

IDE - Browser editor won't save any changes to classes

Since our org has been upgraded to Spring '12 I have had sporatic incidents where I try to edit a classes body (not change the class name or delete it), and the API returns an error:

 

Save error: This apex class is referenced elsewhere in salesforce.com.  Remove the usage and try again. : Visualforce Page - .... visualforce page that uses this class as a controller...

 

 

I'm not trying to delete the class, and removing it from my Visualforce page would require me to remove other pages/classes/etc.

 

This error comes and goes, and happens for all classes that are controllers to VF pages.

 

Some of our classes are part of managed packages, but we're editing them in the org that the package was created out of, so this shouldn't make any difference.

 

I've had some success using the Migration Tool to move changes from another org, but it also sometimes returns this error.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
Starz26Starz26

I have seen that as well.

 

To work around it, I commented out all the contents in the VF page <!-- --> and removed the controller.

 

Then updated the class and put everything back...

 

Frustrating

All Answers

Starz26Starz26

I have seen that as well.

 

To work around it, I commented out all the contents in the VF page <!-- --> and removed the controller.

 

Then updated the class and put everything back...

 

Frustrating

This was selected as the best answer
BritishBoyinDCBritishBoyinDC

Have you tried compiling all the classes again? Not sure why that would help, but I know when people have problems with deployment, that sometimes fixes it...

Starz26Starz26

in my case, I was not using IDE. And compiling all classes did not help

Jordan@BracketLabsJordan@BracketLabs

Recompiling doesn't seem to help for me either...

 

 

 

Jordan@BracketLabsJordan@BracketLabs

@Starz26 your solution help us get through this, but your right VERY FRUSTRATING.

 

Obviously this isn't a way to develop going forward...

 

We logged a case with partner support but they haven't moved on it yet.

Jordan@BracketLabsJordan@BracketLabs

This issue is still happening for me. Anyone else?

wingasauruswingasaurus

Yup! Very annoying!!

 

If I try to change something that is called from the VF component it borks. One of the issues is that you can't get back to your changes!! (or can you??) If I click back on the browser it goes to the VF component in "View" mode losing my changes.

 

Grrrrr....

kumar_hattikumar_hatti

@Starz26  Yup commenting out VF page works...crazy error.

kpollardkpollard

Experiencing the same here.

 

The workaround of removing all references to a controller from all referencing VF pages works, but obviously is not an option long-term.