You are currently viewing Patch Org And Push Upgrade In Salesforce

Patch Org And Push Upgrade In Salesforce

Sharing is caring!

Are you taking advantage of Patch Org And Push Upgrade features for your Salesforce products? If not yet, it is time for you to get going. 

In this blog post, we’ll walk through the advantages of patch release, best practices, and why working with patches for new products would be an effective solution to improve the quality and performance of the product.

The updates you can make to your product are available in two versions:

  • Patches – Minor changes such as cosmetic UX updates or bug fixes that don’t affect the behavior of your product.
  • Upgrades – New or major changes to functionality that change the behavior of the product and the way customers interact with it.

Working with Patch :

The patch version allows developers to change the functionality of the components that are present in the managed package. Patches should be considered as minor improvements to a Managed – Released Managed – and Released package and only used to fix bugs or other errors.

Using a patch will be beneficial if you want to make changes that don’t affect the data model or business logic. Patch versions can only be created for the Major Releases. Subscribers can get patch improvements just like other package versions. However, you can also distribute patches using push upgrades. Each patch is developed in a patch development organization. In this organization, patch versions are developed, managed, and uploaded. To start developing a patch, you need to create a patch development organization.

When you create a patch, you work at a patch development org. This is a special org that only allows changes that don’t break existing installations. If you are a Salesforce AppExchange Partner, you can create a patch development org after logging a case with the Salesforce partner community to get the right permission.

Steps to Create a Patch Org

  1. From Setup, enter ‘Packages’ in the Quick Find box, then select Packages.
  2. Click the name of your managed package.
  3. On the Patch Organization tab, click New.
  4. 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.
  5. Enter a username for a login to your patch org.
  6. Enter an email address associated with your login.
  7. Click Save.

The patch mechanism is a way to create one branch (= one patch org) from each version of the trunk (= packaging org). So with an org containing say version 1.5, a single patch org can be created that goes through versions 1.5.1, 1.5.2, 1.5.3 and so on. To make a new version as per your choice then the new version could be identical to the old version.

(The numbering scheme is major.minor and then major.minor.patch if patches are created.)

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 dependencies.

Advantages of Patch Release

One of the main advantages of the patch version is that it can be automatically transferred to the customer’s organization that updates its installation to the new version of your package.

The following changes are allowed:

  • Adding new methods to Apex controllers
  • Extend the functionality of a Lightning Component
  • Add files to an existing static resource
  • Modify a permission set

Salesforce supports push enhancements to automatically upgrade installed packages. In general, push upgrades can ensure that all customer orgs are on the same or the latest version of the application. This minimizes the potential risk of running an older version of the software.

Pushing an Upgrade:

A push upgrade is a method of automatically upgrading your customers to a newer version of your package. This feature works with managed packages only and you can push either a patch or a major upgrade. You can push an upgrade to any number of organizations that have installed your managed package.

Package subscribers don’t need to do anything to receive push upgrades. The only indication the customer receives after a successful push upgrade is that the package version number has a higher value on the package details page. The programmer initiating the push resolves upgrades that fail.

Steps for Push Upgrades

  • Build your package as you would normally
  • Go back to Setup | Packages and select your package.
  • Go to the Versions tab and press the Push Upgrades button
  • On the next page press the Schedule Push Upgrade
  • Select the version you want to upgrade to and the Date/Time you want to do it
  • Selecting the target version will bring up a list of the Orgs you can upgrade – select the ones you want and then press the Schedule button.

Obviously, the most important step is to Log a Case in the Partner Portal and request both Push Major and Push Patch upgrades.

Guidelines for Push Upgrade

Push Upgrade is one of the most powerful features that provide the ability to upgrade your customers.  Without proper planning and preparation, pushing an upgrade can result in significant customer satisfaction problems.

  1. Avoid changes to validation rules, formula fields, and errors triggered by Apex triggers, as this can negatively affect subscribers’ integration.
  2. Don’t make any changes to a package in a patch. This is because subscribers are not notified of the push upgrade unless the package version number changes.
  3. Test your upgraded package in various environments and duplicate all relevant functions of your customer’s organization, including releases, customizations, installed packages, and permission sets.
  4. Tell your customers beforehand about the timing of the upgrade, the possible consequences, and the necessary steps.

If you’d like more information about managed packages, Patch Org And Push Upgrade In Salesforce, feel free to reach us out today. Contact Cloud Analogy, the world’s most preferred Salesforce App Development Company, now!


Sachin Arora

Scrum Master and Principal Solutions Architect
Sachin, a renowned Scrum Master and Principal Solutions Architect at Cloud Analogy, has rich experience when it comes to working on process improvement in a fast-paced environment maintaining high level of quality in all deliverables. Sachin's expertise lies in varied hardware and software environments including Cloud technologies such as Salesforce, AWS, Cloud Foundry & Google App Engine and Mobile.

Hire the best Salesforce Development Company. Choose certified Salesforce Developers from Cloud Analogy now.

Leave a Reply

× How can I help you?