3

I've a manged package which uses an external API to load some data, and each installation of this package in different orgs require an specific API Key to authenticate against the API.

This APIKey is stored in a hierarchical custom setting, and the setting object is shipped with the package (except the value which is fine).

What I would like to do is prompt user for their APIKey at the installation time (using an InstallHandler as Post Install Handler/VisualForce combination), and add the value to the configuration object.

But I'm unable to find a reference on how to use a VisualForce page from an InstallHandler. Is it possible, or is InstallHandler an entirely background process?

If this method is not practical, what is the recommended way to collect user choices at the package installation time?

4

Install handlers run Apex Code asynchronously in the background, not Visualforce. Given that the installation runs asynchronously, the browser may, in fact, not even be open when the installation completes (say, an hour after the install, etc).

The most appropriate way is either a configuration link (Create a home page custom link, add to package as the configuration link), or a custom tab along the top that a user must click on to complete the setup. This should be in your customization guide and/or installation instructions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.