function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
minkeshminkesh 

how to use field set?

Hello All,

                 I have an transaction object.

                 I have created one page i.e. massUpdateTransaction . in that i want to add field dynamically. Custom Setting is one way to do so.

                 Can i use field set instead of custom settings. and after moving it to the production,are we able to change field set fields ?

                 Please help.

 

Best Answer chosen by Admin (Salesforce Developers) 
minkeshminkesh

Hello All,

                I did not find that i can use field set with my requirement or i don't know it may be possible with field set but i did it using custom settings. it is working.Thank you all for helping me.

 

All Answers

kiranmutturukiranmutturu

ya use can use the fieldsets to dispaly the fields dynamically... first select the avaialble fields in the object and drag and drop the avaialble fields to selected fields section in the field set defiend on the object and you can bind the fieldset to a repeater or datatable like 

<apex:repeat value="{!$ObjectType.Contact.FieldSets.properNames}" var="f"> 
        <apex:outputText value="{!Contact[f]}" /><br/
minkeshminkesh

Hello Kiran,

                     Thank you for your quick reply.

                     can I edit that fields also using the vf page ? and after moving to production,am i able to change this field set ?

                     One more thing how can i map it to controller ? can you post one example ?

Ankit AroraAnkit Arora

Here is the example of using field set :

 

http://forceguru.blogspot.com/2011/02/using-field-set-on-visual-force-page.html

 

After moving it to production you can change the values in field set.

 

 

Thanks

Ankit Arora

Blog | Facebook | Blog Page

Shashikant SharmaShashikant Sharma

You can see on my blog

http://forceschool.blogspot.com/2011/06/dynamic-binding-using-field-sets.html

 

Some more post about advance cases in Field Set when you need to use actionFunction in field Sets.

http://forceschool.blogspot.com/search/label/Dynamic%20Binding 

 

minkeshminkesh

Hello All,

                I did not find that i can use field set with my requirement or i don't know it may be possible with field set but i did it using custom settings. it is working.Thank you all for helping me.

 

This was selected as the best answer