Create and Upload Patches in First-Generation Managed Packages
| Available in: Developer Edition |
| User Permissions Needed | |
|---|---|
| To push an upgrade or create a patch development org | Upload AppExchange Packages |
To enable patch versioning, log a case in the Salesforce Partner Community and request patch versioning be enabled in the org where you created the namespace for the package. Patch versioning is available only to packages that have passed AppExchange security review.
- From Setup, enter Packages in the Quick Find box, then select Packages.
- Click the name of your managed package.
- On the Patch Organization tab, click New.
- Select the package version that you want to create a patch for in the Patching Major Release dropdown. The release type must be Managed - Released.
- Enter a username for a login to your patch org.
- Enter an email address associated with your login.
- Click Save.
The name of the patch development org’s My Domain name is randomly generated.
After you receive an email that Salesforce has created your patch development org, you can click Login to begin developing your patch version.
Development in a patch development org is restricted.
- You can’t add package components.
- You can’t delete existing package components.
- API and dynamic Apex access controls can’t change for the package.
- No deprecation of any Apex code.
- You can’t add new Apex class relationships, such as extends.
- You can’t add Apex access modifiers, such as virtual or global.
- You can’t add new web services.
- You can’t add feature or component dependencies.
You can remove a feature or component dependency from a patch, but after the dependency is removed and the patch version is uploaded, you can't reinstate that dependency in a new patch version. To reinstate the dependency, create a new major or minor package version.
When you finish developing your patch, upload it through the UI in your patch development org. 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.
- From Setup, enter Packages in the Quick Find box, then select Packages.
- Click the name of the package.
- On the Upload Package page, click Upload.
- Enter a Version Name. As a best practice, it's useful to have a short description and the date.
- Notice that the Version Number has had its patchNumber incremented.
- For managed packages, select a Release
Type:
- Choose Managed - Released to upload an upgradeable version. After upload, some attributes of the metadata components are locked.
- Choose Managed - Beta if you want to upload a version of your package to a small sampling of your audience for testing purposes. You can still change the components and upload other beta versions.
- Change the Description, if necessary.
- (Optional) 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.
To distribute your patch, you can either share the upload link or schedule a push upgrade.