28 Oct How to create & upload Managed Package in Salesforce?
A package is a container for something as small as an individual component or as large as a set of related apps. After creating a package, you can distribute it to other Salesforce users and organizations, including those outside your company.
Unmanaged packages are typically used to distribute open-source projects or application templates to provide developers with the basic building blocks for an application. Once the components are installed from an unmanaged package, the components can be edited in the organization they are installed in.
Managed packages are typically used by Salesforce partners to distribute and sell applications to customers. These packages must be created from a Developer Edition organization. Managed packages are also fully upgradeable. To ensure seamless upgrades, certain destructive changes, like removing objects or fields, can not be performed.
- Create a package:
- From Setup, enter Packages in the Quick Find/Search 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.
- Optionally, specify an uninstall script. This is an Apex script that runs in the subscriber organization after the package is uninstalled.
- On the right side of the screen, select the Managed.
- 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.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.
- 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.
“Know more about Salesforce Consulting at Techila”