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

InstallHandler class not being called

I have added a class that implements the InstallHandler interface with an onInstall method but the method is never called when my managed package is installed.  The the testing has been limited to beta builds (don't what it in a release build if it does not work yet and because its global I can't get rid of it once it is in a release build) and the package is an extension package. 


I have added debug statements to the class but no sign of their output anywhere.


The implementation of onInstall is very simple, just calls a method that adds records to a custom object.  The method it calls has been in the package for a long time and works fine if called from a VF page manually.


I did make sure the class has the API version set to 25 and the test class works just fine.


Do not know if it gets called in an upgrade situation since you cannot upgrade a beta version of a managed package.


Any ideas, guesses, or things to try would be appreciated.


Turns out you need to edit the Package and specify the class you want to run for post install or post uninstall. 


Special thanks to Zach McElrath blog post for both pointing out my oversight and a lot of other good info on the current limitations of the InstallHandler mechanism.