Salesforce Package
Create and distribute package:
Introduction
Salesforce packages allow developers to bundle and distribute components like custom objects, fields, Apex code, and more to other Salesforce orgs. This documentation will guide you through the process of creating a package, including adding a connected app and a platform event, and then show how to install the package in other Salesforce orgs.
Types of Salesforce Packages
Salesforce offers two main types of packages:
- Unmanaged Packages: These are typically used for open-source or reusable components and are more flexible. They allow changes to be made in the subscriber org, which makes them ideal for continuous development.
- Managed Packages: These are typically used for commercial apps. Managed packages do not allow changes in the subscriber org, making them suitable for distributing intellectual property.
Creating a Package
Step 1: Create a Package
- In the Setup menu, go to Package Manager.
- Click Create a Package.
- Fill in package details, like Package Name and Namespace (if needed).
- Save the package.
Step 2: Add Components to the Package
You can add various components such as Apex classes, triggers, custom objects, and custom fields to your package.
- In the package details, click Add Components.
- Select the components you want to include.
- Click Add.
Step 3: Version and Distribute the Package
- In the package details, click Create New Version.
- Add a version number and description.
- Click Review and then Distribute to make the package available for installation.