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
Anu Raj.ax1269Anu Raj.ax1269 

Add field to a VF page

Hi,

      I like to add a field to a VF page when a field is added to a object by admin with out re coding the VF page. Is their any way to add fields to VF page automatically when a field get created on the object.  Please help me to solve this issue.

 

Thanks

Anu

Sridhar BonagiriSridhar Bonagiri

Hi,

 

You can achieve this by using 'Schema.getGlobalDescribe()' method.

 

You can go through this website for reference.

 

http://forceguru.blogspot.in/2012/11/page-block-table-with-dynamic-columns.html

 

 

 

Regards,

Sridhar Bonagiri

admintrmpadmintrmp
Use fieldsets in Visualforce. So much easier. It's all in the documentation:

http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm?SearchType=Stem&Highlight=FieldSets|FieldSet|fieldset|fieldsets