Newer Version Available
Create and Upload a Managed Package
| Available in: Salesforce Classic and Lightning Experience |
| Available in: Developer Edition Package uploads and installs are available in Group, Professional, Enterprise, Performance, Unlimited, and Developer Editions |
| User Permissions Needed | |
|---|---|
| To enable managed packages: | Customize Application |
| To create packages: | Create AppExchange packages |
| To upload packages: | Download AppExchange packages |
Creating a managed package is just as easy as creating an unmanaged package. The only requirement to create a managed package is that you’re using a Developer Edition organization.
- Determine if you want to create and upload a managed or unmanaged package.
-
Optionally, install
the License Management Application (LMA) from http://sites.force.com/appexchange. Search for License Management App to locate
it. The License Management Application (LMA) tracks information about each user who installs your app. It
allows you to track what users have which version, giving you a means
of distributing information about upgrades.
The License Management Application (LMA) can be installed in any Salesforce organization except a Personal, Group, or Professional Edition organization and does not need to be the same Salesforce organization that you use to create or upload the package, although it can be. You can also use the same License Management Application (LMA) to manage an unlimited number of your managed packages in different Developer Edition organizations.
- Configure your developer settings. Your developer settings specify your namespace prefix, the Salesforce organization where you install the License Management Application (LMA), and the unmanaged package you want to convert into a managed package.
Use the following procedure to create and upload a managed package through the UI. (You can also upload a package using the Tooling API. For sample code and more details, see the PackageUploadRequest object in the Tooling API Developer Guide.)
- Create a package:
- From Setup, enter Packages in the Quick Find box, then select Packages.
- Click New.
- Enter a name for your package. This does not have to be the same name that appears on AppExchange.
- From the drop-down menu, select the default language of all component labels in the package.
- Optionally, in the Notify on Apex Error field, enter the username of the person who should receive an email notification if an exception occurs in Apex code that is not caught by the code. If you don’t specify a username, all uncaught exceptions generate an email notification that is sent to Salesforce.
- Optionally, in the Notify on Packaging Error field, enter the email address of the person who receives an email notification if an error occurs when a subscriber’s attempt to install, upgrade, or uninstall a packaged app fails. This field appears only if packaging error notifications are enabled. To enable notifications, contact your Salesforce representative.
- Optionally, choose a custom link from the Configure Custom Link field to display configuration information to installers. The custom link displays as a Configure link within Salesforce on the Installed Packages page and package detail page of the subscriber's organization.
- Optionally, enter a description that describes the package. You will have a chance to change this description before you upload it to AppExchange.
- Optionally, specify a post install script. This is an Apex script that runs in the subscriber organization after the package is installed or upgraded. For more information, see Running Apex on Package Install/Upgrade.
- Optionally, specify an uninstall script. This is an Apex script that runs in the subscriber organization after the package is uninstalled. For more information, see Running Apex on Package Uninstall.
- On the right side of the screen, select the Managed checkbox.
- Click Save.
- Optionally, change the API access privileges. By default, API access is set to Unrestricted, but you can change this setting to further restrict API access of the components in the package.
-
Add the necessary components for your app.
- Click Add Components.
- From the drop-down list, choose the type of component.
- Select the components you want to add.
- Click Add To Package.
- Repeat these steps until you have added all the components you want in your package.
- Optionally, click View Dependencies and review a list of components that rely on other components, permissions, or preferences within the package. For more information on dependencies, see About Dependencies. Click Done to return to the Package detail page.
- Click Upload.
-
On the Upload Package page, do the
following:
- Enter a Version Name, such as Spring 12. The version name is the marketing name for a specific release of a package and allows you to create a more descriptive title for the version than just a number.
- Enter a Version Number, such as 1.0. For more information on versions, see Upgrading Your App.
- Select a Release Type of Managed - Released.
- Change the Description, if necessary.
- Optionally, specify a link to release notes for the package. Click URL and enter the details in the text field that appears. This link will be displayed during the installation process, and on the Package Details page after installation.
- Optionally, specify a link to post install instructions for the package. Click URL or Visualforce page and enter the details in the text field that appears. This link will be displayed on the Package Details page after installation.
- Optionally, enter and confirm a password to share the package privately with anyone who has the password. Don't enter a password if you want to make the package available to anyone on AppExchange and share your package publicly.
- Salesforce automatically selects the requirements it finds. In addition, select any other required components from the Package Requirements and Object Requirements sections to notify installers of any requirements for this package.
- Click Upload.
- Once your upload is complete, you can do any of the following.
- Click Change Password link to change the password option.
-
Click Deprecate to
prevent new installations of this package while allowing existing
installations to continue operating.
When you deprecate a package, remember to remove it from AppExchange as well. See “Removing Apps from AppExchange” in the AppExchange online help.
- Click Undeprecate to make a deprecated version available for installation again.