Newer Version Available

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

Associating a Standard Controller with a Visualforce Page

To associate a standard controller with a Visualforce page, use the standardController attribute on the <apex:page> tag and assign it the name of any Salesforce object that can be queried using the Lightning Platform API.

For example, to associate a page with the standard controller for a custom object named MyCustomObject, use the following markup:

1<apex:page standardController="MyCustomObject__c">
2</apex:page>

When you use the standardController attribute on the <apex:page> tag, you cannot use the controller attribute at the same time.

Note