You can now configure customized push upgrades to expire after a certain number of days. With customized push upgrades, partners grant select customers the ability to block push upgrades. Customized push upgrades are especially useful for highly regulated environments where strict compliance and validation protocols require control of upgrade timing and version oversight.
Where: This change applies to second- and first-generation managed packages.
How: 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. In the Developer Console, create a PushUpgradeCustomizationRepository record and enter the number of days that customized push upgrades are available to the subscriber. This example sets customized push upgrades to expire after 90 days.
String pucId1 = PushUpgradeCustomizationRepository.create('packageID', 'subscriberOrgID', true, 90);
System.debug('pucId1 =' + pucId1);
See Also
- Second-Generation Managed Packaging Developer Guide: Enable a Package Subscriber to Restrict Push Upgrades
- Second-Generation Managed Packaging Developer Guide: Push a Package Upgrade for Second-Generation Managed Packages
- First-Generation Managed Packaging Developer Guide: Enable a Package Subscriber to Restrict Push Upgrades
- First-Generation Managed Packaging Developer Guide: Push Package Upgrades to Subscribers