Apex classes that use packaged code can not select older installed versions to use.
Last updated 2021-05-26 ·Reference W-8512184 ·Reported By 2 users
Apex classes that use packaged code can not select older installed versions to use. This impacts access to deprecated methods that were previously called.
In Summer'20 release a change was made so that users could not longer change package version of a managed package from the Apex class edit setup UI.
This however impacts accessibility of deprecated parts of the package.
- If a package is updated and a method, for example, is deprecated the users code will continue to function.
- However if they make any changes to a class that calls the deprecated function, they must also remove any reference to the deprecated function as the version is updated and they can not save the class as the method is no longer accessible.
General Repros in any org:
- Create managed package with apex class with a method
- Release package and install in a new org
- Create Apex class in subscriber org that calls method in packaged class
- Deprecate this method in package and release update
- install updated package in subscriber org
- Attempt to save class in subscriber class
- observe error
- attempt to change package version class points too
- Observe it setting back to latest
Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.