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
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"/>
© Copyright 2000–2014 salesforce.com, inc. All rights reserved.
Various trademarks held by their respective owners.