Use global variables in Visualforce page to access and display system values and resources in your Visualforce markup.
e.g. here the page provides information about the logged-in user in a global variable called $User.
You can access fields of the $User global variable using an expression like {! $GlobalName.fieldName }.
Example -
<apex:page>
<apex:pageBlock title="Logged in User Status">
<apex:pageBlockSection columns="1">
{! $User.FirstName } {! $User.LastName }
({! $User.Username })
</apex:pageBlockSection>
</apex:pageBlock>
</apex:page>
Reference:
https://trailhead.salesforce.com/content/learn/modules/visualforce_fundamentals
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_intro_what_is_it.htm
Visual:
Comments
Post a Comment