Newer Version Available
Enable a Package Subscriber to Restrict Push Upgrades
In certain scenarios, a Salesforce customer may require the ability to block push
upgrades of managed packages that they have installed in their org. Customized push upgrades let
Salesforce Partners give customers the ability to restrict push upgrades to a specific customer
org for a specific package.
Setting up customized push upgrades requires both the Salesforce Partner and Salesforce
Customer to complete specific enablement steps.
-
The Salesforce Partner enables customized push upgrades for a package installed in the
customer org.
- As the Salesforce Partner, log in to either your 1GP packaging org, or your Dev Hub org (for managed 2GP packages) using the system administrator account.
- Click the gear icon and select Developer Console.
- In the Developer Console, select Debug, and then select Open Execute Anonymous Window.
-
Enter the following code, but remember to replace the
packageID (starts with 033)
and subscriberOrgID (starts with 00D)
text for the package ID and customer org you’re enabling.
If the customer wants to block push upgrades to multiple production orgs, you must specify each org ID. Here’s an example of how to enable customized push upgrades for more than one org.
- Click Open Log and then click Execute.
-
Click the Debug Only checkbox and verify that the push
upgrade customization record was created.
The record looks something like: 11:09:15:814 USER_DEBUG [2]|DEBUG|pucId1 =12COK000000000B
- Contact the Salesforce Customer and let them know that customized push upgrades is enabled on your end.
-
After the Salesforce Partner enables customized push upgrades, the Salesforce Customer
blocks push upgrades from Setup in the customer org.
- As the Salesforce Customer, log in to your org.
- From Setup, enter Installed Packages in the Quick Find box, and then select Installed Packages.
- Select the package you’ve requested to block push upgrades, and then select Block Push Upgrades.
- Verify that the Push upgrades are now blocked checkbox is selected.
Salesforce Customers can resume push upgrades at any time by selecting the Allow Push Upgrades button. While the block is enabled, package upgrades can only be installed manually.
Salesforce Partners can view and manage existing customized push upgrades by using the PushUpgradeCustomizationRepository Apex Class.