Share Your Experience With Others

What is Field Set? Why we use Field Set?

A field set is a grouping of fields. For example, you could have a field set that contains fields describing a user’s first name, middle name, last name, and business title.

If the page is added to a managed package, administrators can add, remove, or reorder fields in a field set to modify the fields presented on the Visualforce page without modifying any code.

without using fieldset.png

Using FieldSet.png

Go To

Go to.PNG

 

field set definition.PNG

Add Fields you want to show on visualforce page.

add fields to fieldset.PNG

Create Controller and VisualForce Page: I have created controller to fetch the values dynamically 

Dynamic Controller.PNG

Dynamic Vf page.PNG

Output Before Changes:

output before changes.PNG

Change the order of the fields:

Order Changes.PNG

Output After Changes:

Dynamic Query.PNG

Important Points:

  • Field sets are available for Visualforce pages on API version 21.0 or above.
  • You can have up to 50 field sets referenced on a single page.
  • A Salesforce org can have up to 500 field sets.

 

I hope you guys like this blog. Please share your feedback in comments.

 

 

 

Leave a comment