Updated: Jan 26
A managed package is a software package that can be downloaded and installed in Salesforce to add functionality to the platform. It is considered a "packaged solution" as it includes a set of Salesforce components, such as objects, fields, list views, business rules, etc. These components are related to each other to fulfill a specific function. They are developed and distributed by third parties, and can be installed in one or multiple Salesforce organizations.
Advantages of Creating a Managed Package
Ease of Distribution: A managed package allows for easy distribution of functionality set to multiple Salesforce organizations. This can be particularly helpful if you're developing a solution that can be useful for multiple clients.
Intellectual Property Protection: By creating a managed package, you can protect your intellectual property by hiding the source code of the solution. This means that clients will not be able to view the source code, and won’t be able to modify it without your permission.
Increased Security: Managed packages are installed in an isolated space in Salesforce, which means that the solutions will not have access to the client's data.
Greater Stability: Managed packages are automatically updated when new versions are released, meaning that clients always have access to the latest version of the solution.
Disadvantages of Creating a Managed Package
Greater complexity: Creating a managed package requires a higher level of planning and development than creating a custom solution.
Limitations on customization: Managed packages have certain limitations when it comes to customization, as the source code is not available to the customer.
Higher cost: Creating a managed package can be more expensive than creating a custom solution due to the greater complexity of development.
Steps to Create a Managed Package
1. Use a developer edition organization: To create a managed package, you need to use a developer edition organization. In order to create the developer org from your Environment Hub, please follow this guide.
Create a package: In the Set Up menu, enter "Packages" in the Quick Find box and select "Packages". Click "New," enter a name for your package, select the default language, and optionally enter additional information such as Apex error notifications. Click "Managed" and "Save."
Add necessary components for your application: On the "Components" tab of the package, click "Add" and select the Salesforce components you want to include in the package.
Create a new namespace: Click the "New" button in the "Namespaces" section and follow the instructions to create a new, unique namespace.
Link the namespace to the package: On the "Namespaces" tab of the package, select the namespace you just created and click "Save."
Upload the package: On the "Upload" tab of the package, click "Upload" and follow the instructions to upload the package. Once the package is uploaded, an installation link will be generated.
Test your package: Before distributing your managed package, it is important to test it to make sure it works properly. You can use a Salesforce test organization to install and test your package.
Provide installation instructions: Provide detailed instructions on how to install the package to your customers. Make sure to include the installation link and any additional information required for a successful installation.
Considerations to keep in mind
Keep in mind that Salesforce Sites cannot be included within a package, as they require specific configuration within the organization. Instead, a specific plugin is necessary to include a website in a package.
Some fields, such as the Opportunity stage, cannot be modified through the package, so a plugin is required for modification. It is important to ensure that all components included in the package are necessary before publishing it.
It's also important to keep in mind that managed packages have certain restrictions on the customizations that can be made once installed in an organization. It is recommended to keep an updated version of the package and track user feedback to improve the package and meet their needs.