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
lnryanlnryan 

Deploying classes with sub-classes

I recently encountered a scenario where I was able to develop and unit test without issue a controller class containing internal classes. During the deployment process using the IDE, the validation process also Succeeded; however, when I hit the finish button the deployment failed with the following error: 'Dependent class is invalid and needs recompilation ...[reference to test method and code line]... The configuration of your org has changed, please reload the page. Missing dependent object [reference to original class and subclass object]'

I was able to successfully deploy this class when i moved the internal class definitions to the code block instead of the end, but I'm confused as to whether this worked because internal classes must be declared before all other class methods and properties (and if so why it successfully saved to the sandbox environment in the first place) or whether this worked because it somehow forced the recompilation/page reload  alluded to in the error message.

I know it's not an urgent issue but could someone provide some insight as to what's going on so I can better develop similar classes in the future?

ndoshindoshi
lnryan,

I am currently having an issue where I am getting that same error from a custom button runs some jscript that calls an apex webservice class.
The apex webservice file used to set some fields in a generated subclass called BaseRequest.

I have since removed that from my java web service and re-generated the apex classes (after deleting them) from my wsdl file.

As far as I can tell, I don't see any references to that base class in my generated apex classes, webservice apex class, or the jscript that runs when the button is pushed.

Do you know of anywhere else a dependency on this class could have been created ?

Thanks!
Sanjay33Sanjay33

Hi

I am having a similar issue and it stuck me hard. I have workaround for my beta test environment delete current file and then recreate it. I can't allow to do that in account from which I used to do a release build.

 

I you got able to figure it out and have some solutions please share it.

 

-Thanks