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
adreameradreamer 

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.

Fernando

 

Best Answer chosen by Admin (Salesforce Developers) 
A_SmithA_Smith

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?