Skip to main content

Hi, as the title says, I was wondering if I need to update the API version for every single Apex class / trigger or Visualforce page in our org, regardless of if its Status is Active, or other criteria? I ask because based on a this simple SOQL query I ran we have nearly 2000 Apex classes that would need to be updated:

SELECT Name, ApiVersion FROM ApexClass WHERE ApiVersion < 45.0

Am I misunderstanding what i need to update, or do I really need to update the API version for all of those? And if I don't need to, then how do I determine which classes, triggers, etc that I do need to update?

4 answers
  1. Jun 23, 2025, 1:13 PM

    Hi Lex,

    In our experience, we have updated — and continue to update — many resources such as Apex classes, triggers, Visualforce pages, etc. If you have any active or inactive classes with an API version lower than 45, the release won’t be applied automatically. However, you can activate them manually while your team works on updating the related code.

    It’s possible that some of those classes don’t have associated test classes, since years ago this wasn’t always required. In our case, we found several classes — for example, from 2012 — that had no test coverage, and we had to create test classes because they are now a mandatory requirement to deploy to production.

    I recommend doing a deep analysis beforehand — some classes may be deprecated or no longer in use and can be safely removed from production.

    Unfortunately, there’s no quick way to make these updates; it has to be done one by one. If you have a UAT org, you can activate this manually and verify that nothing breaks, allowing you to focus on any areas that need attention.

0/9000