ApexPage

Represents the saved copy of a Visualforce page. ApexPage uses the cached version of the page unless one is unavailable.

To edit, save, or compile Visualforce pages, use ApexPageMember.

Version 

Introduced in API version 25.0.

Supported SOAP API Calls 

create(), delete(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), update(), upsert()

Supported REST API Methods 

DELETE, GET, HEAD, PATCH, POST, Query

Fields 

ApiVersion 

  • Type: double

  • Required: No

  • Properties: Create, Filter, Sort, Update

  • Introduced: API version 30.0

  • Description: The API version for the page. Every page has an API version specified at creation. If the API version is less than 15.0 and ApiVersion is not specified, ApiVersion defaults to 15.0.

ControllerKey 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Nillable, Sort, Update

  • Introduced: API version 30.0

  • Description: The identifier for the controller associated with this page:

  • If ControllerType is set to Standard or StandardSet, this value is the name of the sObject that defines the controller.

  • If ControllerType is set to Custom, this value is the name of the Apex class that defines the controller.

ControllerType 

  • Type: picklist

  • Required: No

  • Properties: Create, Filter, Group, Restricted picklist, Sort, Update

  • Description: The type of controller associated with this Visualforce page. Possible values include:

This field is available in API version 30.0 and later.

  • Possible values:

    • 0 — Not Specified

    • 1 — Standard

    • 4 — Standard Set

    • 2 — Custom

    • 3 — Java

    • 5 — Spring

    • Not Specified — Not Specified

    • Standard — Standard

    • StandardSet — StandardSet

    • Custom — Custom

Description 

  • Type: textarea

  • Required: No

  • Properties: Create, Filter, Nillable, Sort, Update

  • Introduced: API version 30.0

  • Description: Description of the Visualforce page.

FullName 

  • Type: string

  • Required: No

  • Properties: Group, Nillable

  • Introduced: API version 36.0

  • Description: The full name of the associated metadata object in Metadata API.

Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

IsAvailableInTouch 

  • Type: boolean

  • Required: No

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Introduced: API version 27.0

  • Description: Indicates if Visualforce tabs associated with the Visualforce page can be used in the Salesforce mobile app (true) or not (false). (Use of this field for Salesforce Touch is deprecated.) This field is available in API version 30.0 and later.

Standard object tabs that are overridden with a Visualforce page aren’t supported in the Salesforce mobile app, even if you set this field for the page. The default Salesforce app page for the object is displayed instead of the Visualforce page.

  • Default value: false

IsConfirmationTokenRequired 

  • Type: boolean

  • Required: No

  • Properties: Create, Defaulted on create, Filter, Group, Sort, Update

  • Introduced: API version 28.0

  • Description: Indicates whether GET requests for the page require a CSRF confirmation token (true) or not (false).

If you change this field’s value from false to true, links to the page require a CSRF token to be added to them, or the page will be inaccessible.

  • Default value: false

ManageableState 

  • Type: picklist

  • Required: No

  • Properties: Filter, Group, Nillable, Restricted picklist, Sort

  • Description: Indicates the manageable state of the specified component that is contained in a package:

  • beta

  • deleted

  • deprecated

  • deprecatedEditable

  • installed

  • installedEditable

  • released

  • unmanaged

This field is available in API version 38.0 and later.

  • Possible values:

    • beta — beta

    • deleted — deleted

    • deprecated — deprecated

    • deprecatedEditable — deprecatedEditable

    • installed — installed

    • installedEditable — installedEditable

    • released — released

    • unmanaged — unmanaged

Markup 

  • Type: textarea

  • Required: No

  • Properties: Create, Update

  • Introduced: API version 30.0

  • Description: The Visualforce markup, HTML, Javascript, and any other Web-enabled code that defines the content of the page.

MasterLabel 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, Sort, Update

  • Introduced: API version 30.0

  • Description: The text used to identify the Visualforce page in the Setup area of Salesforce. The Label is Label.

Metadata 

  • Type: complexvalue

  • Required: No

  • Properties: Create, Nillable, Update

  • Introduced: API version 36.0

  • Description: The Visualforce page metadata. Query this field only if the query result contains no more than one record. Otherwise, an error is returned. If more than one record exists, use multiple queries to retrieve the records. This limit protects performance.

Name 

  • Type: string

  • Required: No

  • Properties: Create, Filter, Group, idLookup, Sort, Update

  • Introduced: API version 30.0

  • Description: Required. Name of this Visualforce page.

NamespacePrefix 

  • Type: string

  • Required: No

  • Properties: Filter, Group, Nillable, Sort

  • Introduced: API version 30.0

  • Description: The namespace prefix that is associated with this object. Each Developer Edition org that creates a managed package has a unique namespace prefix. Limit: 15 characters. You can refer to a component in a managed package by using the namespacePrefix__componentName notation.

The namespace prefix can have one of the following values.

  • In Developer Edition orgs, NamespacePrefix is set to the namespace prefix of the org for all objects that support it, unless an object is in an installed managed package. In that case, the object has the namespace prefix of the installed managed package. This field’s value is the namespace prefix of the Developer Edition org of the package developer.
  • In orgs that are not Developer Edition orgs, NamespacePrefix is set only for objects that are part of an installed managed package. All other objects have no namespace prefix.

Usage 

To retrieve information about a Visualforce page, create an ApexPage object that references it. For example code, see .

To edit, save, or compile Visualforce pages, use ApexPageMember.

DID THIS ARTICLE SOLVE YOUR ISSUE?
Let us know so we can improve!