Newer Version Available

This content describes an older version of this product. View Latest

ApexPage

Represents the saved copy of an Apex page. ApexPage uses the cached version of the class unless one is unavailable. Available from API version 28.0 or later.

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

Supported SOAP API Calls

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

Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

Fields

Field Name Details
ApiVersion
Type
double
Properties
Create, Filter, Sort, Update
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. This field is available in API version 30.0 and later.
ControllerKey
Type
string
Properties
Create, Filter, Group, Nillable, Sort, Update
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.

This field is available in API version 30.0 and later.

ControllerType
Type
picklist
Properties
Create, Filter, Group, Restricted picklist, Sort, Update
Description
The type of controller associated with this Visualforce page. Possible values include:
  • Not Specified, for pages defined with neither a standardController nor a controller attribute on the <apex:page> tag
  • Standard, for pages defined with the standardController attribute on the <apex:page> tag
  • StandardSet, for pages defined using the standardController and recordSetVar attribute on the <apex:page> tag
  • Custom, for pages defined with the controller attribute on the <apex:page> tag

This field is available in API version 30.0 and later.

Description
Type
textarea
Properties
Create, Filter, Nillable, Sort, Update
Description
Description of the Visualforce page. This field is available in API version 30.0 and later.
FullName
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
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. This field is available in API version 36.0 and later.
IsAvailableInTouch
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
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.

IsConfirmationTokenRequired
Type
boolean
Properties
Create, Defaulted on create, Filter, Group, Sort, Update
Description
Indicates whether GET requests for the page require a CSRF confirmation token (true) or not (false). This field is available in API version 30.0 and later.

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.

ManageableState
Type
ManageableState enumerated list
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.

Markup
Type
textarea
Properties
Create, Update
Description
The Visualforce markup, HTML, Javascript, and any other Web-enabled code that defines the content of the page. This field is available in API version 30.0 and later.
MasterLabel
Type
string
Properties
Create, Filter, Group, Sort, Update
Description
The text used to identify the Visualforce page in the Setup area of Salesforce. The Label is Label. This field is available in API version 30.0 and later.
Metadata
Type
mns:ApexPage
Properties
Create, Nillable, Update
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. This field is available in API version 36.0 and later.
Name
Type
string
Properties
Create, Filter, Group, idLookup, Sort, Update
Description
Required. Name of this Visualforce page. This field is available in API version 30.0 and later.
NamespacePrefix
Type
string
Properties
Filter, Group, Nillable, Sort
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.
This field is available in API version 30.0 and later.

Usage

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

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