contents
Documentation Version
Summer '15 (API version 34.0)
Language
English
  • Winter '16 Preview (API version 35.0) 35.0
  • Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English
  • Japanese

getRecord()

Returns the record that is currently in context, based on the value of the id query string parameter in the Visualforce page URL.

Signature

public SObject getRecord()

Return Value

Type: sObject

Usage

Note that only the fields that are referenced in the associated Visualforce markup are available for querying on this SObject. All other fields, including fields from any related objects, must be queried using a SOQL expression.

Tip

Tip

You can work around this restriction by including a hidden component that references any additional fields that you want to query. Hide the component from display by setting the component's rendered attribute to false.

Example

<apex:outputText 
value="{!account.billingcity} 
{!account.contacts}"
rendered="false"/>