How Visualforce is Versioned

Visualforce pages and components are versioned. When a page or component has a version number, the functionality of older Visualforce elements doesn’t change as new implementations are introduced. Visualforce versions start at 15.0. If you try to set the version of a Visualforce page to a version earlier than 15.0, it automatically changes to 15.0.

To aid backwards-compatibility, each Visualforce page and custom component is saved with version settings for the specified version of the API as well as the specific version of Visualforce. If the Visualforce page or component references installed managed packages, the version settings for each managed package referenced by the page or component is saved too. This ensures that as Visualforce, the API, and the components in managed packages evolve in subsequent versions, Visualforce pages and components are still bound to versions with specific, known behavior.

Custom components that are referenced in Visualforce pages always perform under their own version number. Thus, if a custom component is set at version 15.0, it always exhibits behavior from Visualforce version 15.0, whether running in a version 15.0 or a 16.0 page.

The release notes list changes between Visualforce versions. The component reference also lists which Visualforce version a standard component was introduced in, as well as whether a component or attribute was deprecated in a version.

How Visualforce Versions Relate to Salesforce API Versions

The version of a Visualforce page or component affects the version of the Salesforce API used by that page or component. A Visualforce page with a version of 16.0 uses Salesforce API version 16.0 internally, ensuring consistent behavior. However, this behavior is specific to the Visualforce framework and built-in components.

If your component makes use of external calls to Salesforce Platform APIs, such as the REST API, those calls are not versioned along with the component. The version of the call is embedded in the parameters of the call itself, usually the URL. It’s your responsibility to update the API used for external calls as needed.

Visualforce internal behavior is not affected by the Salesforce Platform API Versions 21.0 through 30.0 Retirement. However, if your pages or components make external calls to the SOAP, REST, or Bulk API versions prior to API 31.0, they are affected by the retirement of those API versions. It’s your responsibility to update your pages and components to use supported API versions.

Important

Set the Version of a Visualforce Page or Component

To set the Salesforce API and Visualforce version for a Visualforce page or custom component:

  1. Edit a Visualforce page or component and click Version Settings.

    You can only modify the version settings for a page or custom component on the Version Settings tab when editing the page or component in Setup.

    Note

  2. Select the Version of the Salesforce API. This is also the version of Visualforce used with the page or component.
  3. Click Save.