function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Paul Dyson.ax812Paul Dyson.ax812 

Can't save classes with inner classes

Getting a very odd but consistent problem when trying to save new classes that contain an inner class (or enum) such as:

 

public class OuterClass {

    // some methods

    public class InnerClass {
        // some methods
    }
}

 

 Whether saving from the IDE or the Web interface we get the error message:

 

OuterClass: line -1, column -1: The configuration of your org has changed, please reload the page.  Missing dependent object: Type: OuterClass: InnerClass

 

If we remove all the methods of outer class and save just with the InnerClass declared the problem goes away and we can then add the methods back in and save the full class declaration.

 

 

Ispita_NavatarIspita_Navatar

Hi Paul,             

             When i used the same code at my system in the salesforce org, its working fine. The Inner class behaves as a wrapper class. hence we can declare the  wrapper class inside the main class.            

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

MiddhaMiddha

weird issue, spent some time on this.

 

Finaly ended up deleteing all the contents of my class, saving it and then putting everything back in the class, it worked!!

BryanHartBryanHart

I'm currently having a similar problem now.

 

The code already exists and is happily living in my package org.

but when I try to use ANT to deploy it to a dev org, its telling me that my inner class is missing.