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
AbAb 

Deployment | Apex controller does not exsist | Strange ?

Hello,

I have error while deploying VF and Apex from one sandbox to another.

Component Errors
API Name: ACandidatePrint_v2
Type: Visualforce Page
Error Message: Apex class 'PrintController' does not exist

but "PrintController" is available in change set, i am deploying, but i dont get why i have this error
 
Best Answer chosen by Ab
Nagendra ChinchinadaNagendra Chinchinada
Even I faced the same issue, I am not sure the exact reason for this, but I can give u the workaround,
Split your changeset into 2 parts.
In the First changeset add Controller and  any dependent components for that VF like objects, controllers, custom labels ... etc.and deploy that changeset first.
Then add VF page in the second changeset and deploy it after changeset 1.

All Answers

Nagendra ChinchinadaNagendra Chinchinada
Even I faced the same issue, I am not sure the exact reason for this, but I can give u the workaround,
Split your changeset into 2 parts.
In the First changeset add Controller and  any dependent components for that VF like objects, controllers, custom labels ... etc.and deploy that changeset first.
Then add VF page in the second changeset and deploy it after changeset 1.
This was selected as the best answer
Mahesh DMahesh D
Hi Sandrine,

Please try to re-compile the class and VF page to make sure that both components are valid.

Now you can deploy both combinedly in one change set.

If that doesn't work then proceed with what Prasad said like first deploy the Controller followed by Visualforce Page.


Please do let me know if it helps you.

Regards,
Mahesh