+ Start a Discussion

Execute anonymous class in a managed package

Hi All,


Is there any restriction in including a class in a managed (beta) package in executing anonymous ?


The situations is the following:


1. We have a dev org which we use to create the package. In that org we can execute anonumous code that references a class in the package.

2. The package is installed in a different org. The same execute anonymous code does not run. It complains it does not know the class that is in the package (the namespace has been pre-pended to the class name).


Thanks in advance.



Best Answer chosen by Admin (Salesforce Developers) 

Most likely you do not have access to the class on your profile or the class is annotated as something other that global.  The class/methods must be global for you to be able to call them.  Can you check these things?