+ Start a Discussion

InstallHandler - installerId()

I can understand the installerId() working well for when a fresh install or manual upgrade is taking place, but what is the outcome of this method for the following:


  • Trialforce instance creation
  • Push upgrade



Install scripts are not executed as part of trialforce instance creation.


For push upgrades, there may be an ID, but it's for a special system user - not a real user in the sub org.  


Ok, thanks.


If we were to push an upgrade, how can we get the app to recognize who the system administrator is without querying the Profile object? The reason I ask this is because as far as I can remember, Professional Edition has a problem with using the Profile object.


What I would like to happen is for the app to automatically send an email out to the system administrator when the install has completed but I can't see a field which recognizes who should be contacted in that case.


I haven't tried what you are describing in PE, but I could see that being an issue.  Try this query and see if it works in PE.


SELECT Email FROM User where Profile.Name = 'System Administrator' and isActive = true;