O'Reilly logo

Visualforce Developer's Guide by W.A.Chamil Madusanka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with field sets

A field set is a group of fields which can be defined in a declarative manner. Field sets are available in Visualforce pages in the API Version 21.0. These field sets can be displayed on a Visuaforce page by dynamic binding. For example, suppose we have created a field set (field set name: CustomerDetails) with the Email__c, Name, and Address__c fields of the customer object. We can refer to the CustomerDetails field set in Visualforce as follows:

<apex:page standardController="Customer__c">
    <apex:repeat value="{!$ObjectType.Customer__c.FieldSets.CustomerDetails}" var="f">
        <apex:outputText value="{! Customer__c [f]}" /><br/>
    </apex:repeat>
</apex:page>

When we want to create a managed package or add/ remove/reorder fields ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required