Allow Apex code to be run in post-install ghost user context - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
960  Points
Idea has been posted. Give it an upvote or downvote.

Allow Apex code to be run in post-install ghost user context

Apex & Visualforce

We are an ISV that deploys our application via managed packages. Each of our packages includes an Apex class that implements the InstallHandler interface to perform various post-install upgrade operations. There have been many occasions where we've encountered post-install operations that run fine when run from regular user context, but fail when actually run at post-install time for various reasons. This is due to the fact that at post-install time, the code runs in the context of a special "ghost" user. These failure can be very difficult to detect prior to release, and difficult to debug when they do occur, because there is no way to run your InstallHander code in this "ghost" user context while still in a development environment where it can be properly debugged. My idea is to provide a mechanism for running your InstallHandler code within Developer Edition orgs with the exact same user context that it will have at post-install time. 

Merge Idea · Flag

  • Upvotes
  • Downvotes



from AppExchange


Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.