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
NalinakuNalinaku 

How to add fields to VF pages without code change?

The scenario is there is already a VF page with apex code which is retrieving some set of fields. Now I need to add 10 more columns to both VF page and APEX code without modifying the code. 
Kindly suggest how can I approach this. 
Raj VakatiRaj Vakati
Option 1 :  Working with Field Sets

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_dynamic_vf_field_sets.htm
<apex:page standardController="Contact">
    <apex:repeat value="{!$ObjectType.Contact.FieldSets.properNames}" var="f"> 
        <apex:outputText value="{!Contact[f]}" /><br/>
    </apex:repeat>
</apex:page>

Option 2: Use Custome Object / Custom Metadata /Custom Settings to get the fields

https://salesforce.stackexchange.com/questions/139977/does-dynamic-soql-support-bind-expressions

http://www.redpointcrm.com/add-pagination-using-dynamic-visualforce-components-and-soql-offset 
 
NalinakuNalinaku
Thanks Raj V. I will try this.