Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Apex Code Items That Aren’t Versioned
As a package developer, you can add or remove these items from Apex in manage packages.
- @Future
- @IsTest
- with sharing
- without sharing
- transient
You can make limited changes to these Apex items in managed packages.
- private—can be changed to global
- protected—can be changed to global
- public—can be changed to global
- abstract—can be changed to virtual but can’t be removed
- final—can be removed but can’t be added
You can’t remove or change these Apex items in managed packages.
- global
- virtual
You can add the webservice keyword, but once it has been added, it can’t be removed.
If a package upgrade includes an explicit global constructor for a released global class that previously only had an implicit constructor, then the new, explicit constructor will be called from the subscriber. Also, you can’t reduce the access modifier on the default constructor on a released global class in a package. See Best Practices for Using Global Apex in Managed Packages.