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
admintrmpadmintrmp 

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

Thanks

A_SmithA_Smith

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.  

admintrmpadmintrmp

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.

A_SmithA_Smith

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;