---
schema_version: "1"
id: 7eb194290ed1574b392bbe62fef4515eda036cc2cf09c6ca6526e441166f95bd
title: Get Compiler Warnings for Apex API Versions 9.0 Through 19.0
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/release-notes/264-0-0/rn_apex_version_compiler_warnings.md
canonical_url: https://help.salesforce.com/s/articleView?id=release-notes.rn_apex_version_compiler_warnings.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 9bebf459b12af9f7dc0ba36f6229f9cfc04e2892d1589b911967ac5f6ef8f8d7
description: Apex classes and triggers saved at API versions 9.0 through 19.0 will be retired in a future release. The Apex compiler now warns you when you compile or deploy Apex code at these API versions. To prepare for this future retirement, identify and update your Apex classes and triggers to API version 20.0 or later.
products:
  - Cross Cloud
release: "264"
---
# Get Compiler Warnings for Apex API Versions 9.0 Through 19.0

Apex classes and triggers saved at API versions 9.0 through 19.0 will be retired in a future release. The Apex compiler now warns you when you compile or deploy Apex code at these API versions. To prepare for this future retirement, identify and update your Apex classes and triggers to API version 20.0 or later.

**Where:** This change applies to Apex API versions 9.0 through 19.0 in Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions. The compiler warnings appear in development tools that surface compiler output, including Setup, the Salesforce CLI, Salesforce Extensions for VS Code, Web Console, and Tooling API.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-release-notes-salesforce_release_notes-264-0-0-production-enus/550ba85b-db1a-4608-9cd4-9a65ec96e1fa/images/icon_important.png)

Important The scheduled Apex API version retirement applies to Apex class and trigger metadata versions. It doesn’t apply to Visualforce page versions, Flow versions, or Process Builder versions. It also doesn’t apply to custom Apex REST or SOAP web service endpoint versions. The Apex API version retirement is unrelated to the [Salesforce Platform API retirement](https://help.salesforce.com/s/articleView?id=000380623&type=1&language=en_US).

**How:** If you deploy Apex classes and triggers with API versions 9.0 through 19.0, the Apex compiler returns this warning: Apex API version {XX} is scheduled for retirement. Update to the latest API version to avoid compile failures. If you compile Apex via the Apex Classes or Apex Triggers pages in Setup, compiler warnings identify classes or triggers that are saved at API versions 9.0 through 19.0.

To address these warnings, update the identified classes or triggers to Apex API version 20.0 or later. Salesforce strongly recommends that you use the latest available Apex API version. After updating the Apex API version, test your code thoroughly. Review previous [Release Notes](https://help.salesforce.com/s/articleView?id=release-notes.rn_previous_release_notes.htm&release=262&type=5&language=en_US) for each major version to understand potential changes. For a summary of major behavior changes per Apex API version, review [Apex Versioned Behavior Changes](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/versioned_behavior_changes.htm) in the Apex Developer Guide. Then deploy the updated classes using your standard deployment process.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-release-notes-salesforce_release_notes-264-0-0-production-enus/550ba85b-db1a-4608-9cd4-9a65ec96e1fa/images/icon_note.png)

Note If your org contains managed Apex at API versions 9.0 through 19.0, the warning appears for those classes or triggers during compilation. However, subscribers can’t modify managed package source code. Package developers must release updated package versions with Apex classes at API version 20.0 or later. If you depend on a managed package with deprecated API versions, contact the package developer.

#### See Also

- [_Apex Developer Guide_: Apex Versioned Behavior Changes](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/versioned_behavior_changes.htm)
- [_Apex Developer Guide_: Setting the Salesforce API Version for Classes and Triggers](https://developer.salesforce.com/docs/atlas.en-us.264.0.apexcode.meta/apexcode/apex_classes_version_settings_api.htm)
- [_Metadata API_: ApexClass](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_classes.htm)
- [_Metadata API_: ApexTrigger](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/meta_triggers.htm)