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
forceful2forceful2 

Help with migrating Apex code to a new Development Org

We were able to migrate the custom objects from our main Development Org to parallel secondary Development Orgs using "Deploy to server" in Eclipse. But, we are unable to do the same with Apex code. The error log includes the following:

 

dependent class is invalid and needs recompilation,

variable does not exist,

invalid type; 

 

Is there an easy way to deploy the classes to the other server?

Jon Mountjoy_Jon Mountjoy_

Hmm I've never seen that.  I'm moving this thread to the Apex discussion board, where it has more of a chance of getting answered.    I did a quick search though, and found this  and this - perhaps those posts can help you. 

forceful2forceful2

Thank you for the quick response. The two links that you sent me are not directly related to our problem. For the bulk of the classes, the reported error belongs to "dependent class" category.

 

Thank you for moving it to the other area where I am more likely to get some answers. Usually when you get 55 identical errors for about 60 classes, it is something very simple - invariably operator error.

ErikssonEriksson

Hi,

 

It might be caused by your change on some classes which reference to other classes or be referenced by other classes or other component. Check if all your apex classes and VFs are valid or not. You have to run all your test methods before the migration. If this error still exists, I suggest you edit and save every possible classes and VFs manually. Sometimes, it actually helpful.

 

Cheers