Skip to content

Instantly share code, notes, and snippets.

@leehildebrand
Last active February 2, 2017 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leehildebrand/9e9e1a57331adddf5d996fad8ef69cea to your computer and use it in GitHub Desktop.
Save leehildebrand/9e9e1a57331adddf5d996fad8ef69cea to your computer and use it in GitHub Desktop.
VisualForce Schema Field Label
<apex:page standardController="Account">
<apex:form >
<!-- both inputFields below write to an Account field named Demo_Field__c -->
<apex:pageBlock >
<apex:pageBlockSection title="Developer 1 below used a static text to talk about the field label" columns="2">
I am talking about a field named "Demo Field"!
</apex:pageBlockSection>
<apex:pageBlockSection title="Developer 2 below used a schema variable to talk about the field label" columns="2">
I am talking about a field named "{!$ObjectType.Account.fields.Demo_Field__c.Label}"!
</apex:pageBlockSection>
</apex:pageBlock>
</apex:form>
</apex:page>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment