---
schema_version: "1"
id: 8c5e3a60dfdd4fdb40d838826e183009f22afa40db83cc2af0a8aabd1ce04d27
title: ApexPageMember
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_apexpagemember.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_apexpagemember.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: de36b2d4064ee628ff2a5b49131df65d8217b4e38db80ef02f7204bbd365d5c2
description: Represents the working copy of a Visualforce page for editing, saving, or compiling in a MetadataContainer.
---
# ApexPageMember

Represents the working copy of a Visualforce page for editing, saving, or compiling in a MetadataContainer.

## Supported SOAP API Calls

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

## Special Access Rules

As of Spring ’20 and later, to access ApexPageMember, users must have both the View All Data and Customize Application permissions.

## Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

## Fields

| Field Name | Details |
| --- | --- |
| Body | 
Type

string

Properties

Create, Update

Description

The data for the Visualforce page.

The Body field is the only field you can update() or PATCH.





 |
| Content | 

Type

string

Properties

None

Description

A string representation of ApexPageMetadata that lists the version, status, and packaged versions of the corresponding Visualforce page.



 |
| ContentEntityId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

A reference to a Visualforce page.

There can be only one ContentEntityId per ApexPageMember, otherwise, an error is reported.

This field is required if FullName is not specified.



 |
| FullName | 

Type

string

Properties

Group, Nillable

Description

The full name of the associated object in the Metadata API. Use to avoid race conditions on create, before you have IDs.

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 required if ContentEntityId is not specified.



 |
| LastSyncDate | 

Type

dateTime

Properties

Filter, Sort

Description

The date that this ApexPageMember Body was replicated from the underlying entity.

When you deploy a MetadataContainer, this value is compared with the LastModifiedDate of the underlying Visualforce page. If LastSyncDate is older than LastModifiedDate, the deployment fails with an error.





 |
| Metadata | 

Type

ApexPageMetadata

Properties

None

Description

An object that describes the version, status, and packaged versions of the corresponding Visualforce page.

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.



 |
| MetadataContainerId | 

Type

reference

Properties

Create, Filter, Group, Sort

Description

A reference to a [MetadataContainer](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacontainer.htm "Manages working copies of ApexClassMember, ApexTriggerMember, ApexPageMember, and ApexComponentMember objects, including collections of objects to be deployed together.") or [ContainerAsyncRequest](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_containerasyncrequest.htm "Allows you to compile and asynchronously deploy a MetadataContainer object to your organization.") object.

As part of a successful deployment, this field is reset from the ID of the deployed [MetadataContainer](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacontainer.htm "Manages working copies of ApexClassMember, ApexTriggerMember, ApexPageMember, and ApexComponentMember objects, including collections of objects to be deployed together.") to the ID of the corresponding [ContainerAsyncRequest](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_containerasyncrequest.htm "Allows you to compile and asynchronously deploy a MetadataContainer object to your organization.") object.

This field is required.





 |

## Usage

To edit, save, or compile a Visualforce page, create an ApexPageMember object that references it. To create a Visualforce page, use the REST API or the Metadata API.

![Note](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/images/icon_note.png)

#### Note

Once an ApexPageMember is successfully deployed in a [MetadataContainer](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacontainer.htm "Manages working copies of ApexClassMember, ApexTriggerMember, ApexPageMember, and ApexComponentMember objects, including collections of objects to be deployed together."), the MetadataContainerId is changed to the ID of the [ContainerAsyncRequest](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_containerasyncrequest.htm "Allows you to compile and asynchronously deploy a MetadataContainer object to your organization."), and the ApexPageMember can’t be modified or reused.

Visualforce pages and components are often dependent on each other for functionality. To successfully save and compile a group of related source files, put the corresponding ApexPageMember and ApexComponentMember objects in a single MetadataContainer object. Use ContainerAsyncRequest to send the MetadataContainer to the application server.

Each ApexPageMember object can only refer to a single MetadataContainer object. Multiple ApexPageMember objects can refer to the same MetadataContainer object.

#### See Also

- [REST API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_rest.meta/api_rest/ "REST API Developer Guide - HTML (New Window)")
- [Metadata API Developer Guide](https://developer.salesforce.com/docs/atlas.en-us.264.0.api_meta.meta/api_meta/ "Metadata API Developer Guide - HTML (New Window)")