I have an Apex class inside my managed package:

global class MyGlobalClass {
    global static void doWork() {

But when I call this code from the org where this package is installed:


I get this error:

Variable does not exist: MyGlobalClass

What can I do to make this class available not just inside the package, but also inside org where it's installed?

1 Answer 1


You have to use the namespace to reference a component in a managed package. Just changing the code in the subscriber org should work. Here's the modified version you'd want to use (change packageNS as appropriate):


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .