Get a Field Label in a Visualforce Page

You can access the Label attribute of a field directly from a Visualforce page by using the following: <apex:outputLabel value=”{!$ObjectType.Account.fields.Name.label}” /> This gets the label for the “Name” field from the “Account” object.  You can interchange any sObject name and it’s corresponding field as needed. Advertisements

Use a Fieldset in APEX and Visualforce

There are times where you may need to access fieldsets in APEX to dynamically generate pages in Visualforce.  In Apex, there are 2 main ways to do this, and you can select which approach you need based on what data you have available at runtime. Getting Fieldsets in Visualforce You can access fieldsets directly from a […]