3

I'm working on a managed package that leverages the new Salesforce Order and OrderItem object. However, when trying the managed package in an org where the order is not enabled, the installation fails. Is there any way to enable features using Apex in an installation script?

1 Answer 1

4

No, because the installation will fail before the InstallHandler script has a chance to execute. The administrator must enable the feature beforehand.

2
  • That's what I was afraid of. Can we turn it on by using the metadata api? Jul 6, 2014 at 9:02
  • @Lex You can't turn on that feature through any API that I'm aware of. Consider it a "pre-installation step" that your customers will have to go through before they can install your package. It's really quite normal, perhaps even natural that they'll have some pre-installation steps. It would be convenient if salesforce would automatically prompt to enable any missing features, but unfortunately, it does not happen today.
    – sfdcfox
    Jul 6, 2014 at 14:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .