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
ForcecodeForcecode 

Test functions in managed package and using "with sharing"

We added the "with sharing" keyword to all classes and controllers in our managed package.

 

The test functions work fine in the master dev org, but when I install a beta version into another dev org,

I now get many test errors of type:

 

"System.NullPointerException: Attempt to de-reference a null object

 

The installation worked before we used "with sharing".

 

 

Is there some guidance available how to simulate the scenario during the installation process in our master dev org.

 

There are no line numbers given, only function names. I have no idea what could cause these errors or how to fix them.

 

Thanks.

ForcecodeForcecode
Forget this message, I made a mistake.