How to make an appexchange package that includes t

2019-04-13 09:20发布

问题:

I am implementing salesforce in a 3rd party app in cakephp. My consumer key is only in one org that I created , its not working in any other org. How to make an appexchange package that includes the key so that I can install the package in other orgs. Thanks

回答1:

You need to create whats called a managed package, and to add the token/remote access settings to that package. To create a managed package, you have to turn on a managed namespace in your developer org, for that reason, i would do this in a new/separate developer edition account.

  1. Sign up a new developer edition account.
  2. Login to the new account
  3. Goto setup / app setup / create / packages, click edit on the developer settings section.
  4. follow the instructions to give the org a namespace prefix.
  5. from the package page again, in the packages section click new and fill out the form, remember to check the managed option.
  6. from the package detail page, click new in the remote access related list.
  7. fill in the form and click save, a new client id & secret will be generated.
  8. You can publish a package with just a remote access settings in it, you'll need to add something else to it as well (perhaps a document that describes your app for example)
  9. use the add components to add your doc, or other item(s) to the package.
  10. click the upload button and follow the instructions to make your package available to other orgs.
  11. when the package is available, you'll get an email (normally 5-10 minutes) that contains the installation link.

Now you've created and published your package that contains your tokens, using the installation URL, you can now install that package in other orgs.

  1. click or paste the installation URL into a new browser window/tab.
  2. login with the target orgs credentials
  3. from the package installation page, click continue and walk through the install wizard.
  4. all done!

users in the target org should now be able to login with your oauth info.