Skip to main content

Use of Deprecated: Salesforce API (21-30)

Detects components still using deprecated Salesforce API versions 21.0–30.0.

David Martin avatar
Written by David Martin
Updated over a week ago

Overview
This rule detects components that are configured to use a significantly outdated version of the Salesforce Platform API. Specifically, versions 21.0 through 30.0 of the Salesforce Platform SOAP, REST, and Bulk APIs were deprecated and are no longer supported as of the Summer '23 release. Continuing to use these old API versions can lead to critical compatibility issues and prevent your application from leveraging essential platform advancements.

Code Reviews classifies this as an Error because continued reliance on these specific deprecated API versions will directly cause failures for applications attempting to integrate or function, impacting their stability and ability to deploy in modern Salesforce environments.

Why This Matters Using deprecated Salesforce API versions (21.0-30.0) can lead to:

  • Application Failures: Integrations or custom code relying on these retired API versions will cease to function correctly, leading to critical disruptions in business processes.

  • Deployment Blockers: Components configured to use these API versions may fail validation or deployment in orgs running current Salesforce releases.

  • Missed Security Updates: Older API versions do not benefit from the latest security enhancements and patches, potentially exposing your application to known vulnerabilities.

  • No Access to New Features: Applications tied to old API versions cannot utilize new functionalities, performance improvements, or bug fixes introduced in recent Salesforce releases.

  • Increased Technical Debt: Significant refactoring and re-development may be required to update these applications, increasing maintenance costs and slowing future development.

  • Lack of Support: Salesforce no longer provides support for issues encountered when using these retired API versions.

What Triggers This Rule
Code Reviews flags Apex classes, Visualforce pages, integration configurations, or other custom components that explicitly declare an apiVersion between 21.0 and 30.0 (inclusive) in their metadata XML files (e.g., .cls-meta.xml, .page-meta.xml). This rule identifies components that are using versions of the Salesforce Platform SOAP, REST, and Bulk APIs that are no longer supported.


Recommended Safeguards To ensure your applications remain functional, secure, and compatible with the Salesforce platform:

  • Prioritize Immediate Upgrade: Identify all components using API versions 21.0 through 30.0 and prioritize upgrading them to a recent, supported API version (e.g., the current API version 60.0 or higher as of Spring '24, or version 59.0 in Summer '23 when this deprecation occurred).

  • Review and Refactor Integrations: Pay special attention to external integrations that might be configured to call Salesforce using these deprecated API versions. Coordinate with external system owners to update their integration endpoints.

  • Update Component Metadata: Modify the apiVersion attribute in the metadata XML files for all flagged components.

  • Thorough Testing: After upgrading API versions, perform comprehensive testing of the affected components and integrations to ensure correct functionality and prevent unintended regressions.

  • Stay Current with Salesforce Releases: Regularly review Salesforce release notes for announcements regarding deprecations, retirements, and new features to proactively plan upgrades.

  • Implement Static Analysis: Utilize tools like Code Reviews to automatically detect and flag components using deprecated API versions as part of your CI/CD pipeline, ensuring compliance and preventing reintroduction of old versions.

Summary
The "Use of deprecated: Salesforce API (21-30)" rule flags components using API versions 21.0 through 30.0 as an Error because these versions are no longer supported as of Summer '23. Continued use leads to critical application failures and deployment issues. Upgrading affected components and integrations to a current API version is essential for maintaining a stable, secure, and future-proof Salesforce application.

Did this answer your question?