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

Cannot find Apex Class error in Managed Package

Hi all,


We have a managed package with Namespace prefix 'MFS'.
Package is installed at a production account.


Say, we have VF page XYZ with XYZController
and another VF page ABC with ABCController
Now While clicking at a link in a particular VF page, and it is forwarding to VF page XYZ, error coming is
"Apex class 'XYZController' doesn't exist"

WHAT is the reason?


I have found 1 thing. While clicking some link to forward any VF page like ABC , URL is coming like below:

And ABC is working fine.
But ONLY for XYZ, it is coming like this:

And XYZ is not working.


Is this any problem?

IS the problem lies in 'MFS' prefix?


If anyone has answer to this please reply as soon as possible.

Thanks in advance.


There's not enough info here. Can you please provide the following information?


* Is the page managed?
* Is the controller managed?
* How is the link from ABC referencing XYZ? Provide a code sample.



The controller and page both are managed. 

And there is no link between ABC & XYZ. The functionality of ABC & XYZ are same. I have written that to show an example that same thing is working for ABC and for XYZ is coming error. As I wrote in the previous post the namespace prefix(MFS) is not coming in case of XYZ.




Try this. In your managed package org, attempt to create page XYZ by going to Setup > Develop > Pages, and also try to create the class XYZController in Setup > Develop > Apex Classes. If it allows you to create either the page or class, you have glitched your metadata, and will need to delete the glitched file, and recreate it (I have personally experienced this bug myself, and had submitted a case regarding it). The glitch occurs if a class or page is created through the Developer Console. I've logged a case about this, and Developer Support has it logged as a bug.


Edit: Also, you can tell if they're glitched by adding the "namespace" column in a list view on pages and classes. If the namespace is blank, you've glitched the file.