Show Menu
Cheatography

SalesForce Visualforce Page Cheat Sheet by

Global Variables

$Action
global merge field type to use when refere­ncing standard Salesforce actions
$Api
global merge field type to use when refere­ncing API URLs
$Asset
global merge field to use when refere­ncing images and other assets that are part of the Lightning Design System
$Cache.Org
global merge field to access an org cache from a Visual­force page. Retrieve cached values from a specified partit­ion’s org cache in the referenced org
$Cache.Session
global merge field to access an org’s session cache from a Visual­force page. Retrieve cached values from a specified partit­ion’s session cache in the referenced org.
$Component
global merge field type to use when refere­ncing a Visual­force component
$ComponentLabel
global merge field to use when refere­ncing the label of an inputField component on a Visual­force page that is associated with a message
$Curre­ntPage
global merge field type to use when refere­ncing the current Visual­force page or page request
$FieldSet
Provides access to a field set defined in your organi­zation
$Label
global merge field type to use when refere­ncing a custom label
$Label.Site
global merge field type to use when refere­ncing a standard Sites label in a Visual­force page. Like all standard labels, the text will display based on the user’s language and locale
$Network
global merge field type to use when refere­ncing community details in a Visual­force email template
$Objec­tType
global merge field type to use when refere­ncing standard or custom objects (such as Accounts, Cases, or Opport­uni­ties) and the values of their fields
$Organ­ization
global merge field type to use when refere­ncing inform­ation about your company profile. Use organi­zation merge fields to reference your organi­zat­ion’s city, fax, ID, or other details.
$Page
global merge field type to use when refere­ncing a Visual­force page
$Permi­ssion
global merge field type to use when refere­ncing inform­ation about the current user’s custom permission access. Use permission merge fields to reference inform­ation about the user’s current access to any of your organi­zat­ion’s custom permis­sions
$Profile
global merge field type to use when refere­ncing inform­ation about the current user’s profile. Use profile merge fields to reference inform­ation about the user’s profile such as license type or name
$Resource
global merge field type to use when refere­ncing an existing static resource by name in a Visual­force page. You can also use resource merge fields in URLFOR functions to reference a particular file in a static resource archive
$SControl
global merge field type to use when refere­ncing an existing custom s-control by name. This merge field type results in a URL to a page where the s-control executes
$Setup
global merge field type to use when refere­ncing a custom setting of type “hiera­rchy.”
$Site
global merge field type to use when refere­ncing inform­ation about the current Salesforce site
$Syste­m.O­rig­inD­ateTime
global merge field that represents the literal value of 1900-01-01 00:00:00
$User
global merge field type to use when refere­ncing inform­ation about the current user. User merge fields can reference inform­ation about the user such as alias, title, and ID. Most of the fields available on the User standard object are also available on $User
$User.U­ITheme
$User.U­IT­hem­eDi­splayed
global merge fields identify the Salesforce look and feel a user sees on a given Web page
$UserRole
global merge field type to use when refere­ncing inform­ation about the current user’s role. Role merge fields can reference inform­ation such as role name, descri­ption, and ID
 

HowTo

Use global variables to reference general inform­ation about the current user and your organi­zation on a page.
Global variables must be referenced using Visual­force expression syntax to be evaluated, for example, {!$Use­r.F­irs­tName}.
Visual­force Developer Guide
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Salesforce CLI Cheat Sheet
          Salesforce Javascript Functional Cheat Sheet