Salesforce Variables & Formulas - Salesforce

What are Salesforce Variables & Formulas?

The data from the Salesforce objects can be fetched into the Visualforce page by means of variables and expressions. Like further normal programming language, the Visualforce language has expressions, operators and literals, etc. The elementary building block of this language is expressions.

The syntax of a Visualforce expression is as below.

Example

Let us use the global variable $user. We can write the resulting code to get the username, First name and login name.

vf_variables_expressions

On showing the output, we get the resulting details.

vf_variables_expressions2

Likewise, we can use numerous other variables and manipulate them using formula as revealed in the code below.

vf_variables_expressions3

On showing the output, we get the resulting details.

vf_variables_expressions4 (1)

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

Salesforce Topics