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
SolipSolip 

Display all fields of an object in edit mode

Hi 

 

Is there a way we can display all fields of an object (not yet inserted/no ID) in edit mode in visualforce page? Is there a simpler approach than input fields/repeat/describe approach?

 

We are implementing a custom cloning solution mimicing standard cloner for one of our custom objects. And just like the standard cloning functionality, we would like to show all record fields for the user to change before they hit save (and we save the cloned record). Clone button was overridden to transfer user to a visualforce page, this is where we want to display all fields.

 

Thank you

 

Edit: Another solution I had in mind was to use apex:detail with inline support and subject=original record, use JS to remove the standard buttons and then clone the original record. But this approach I think is going to confuse the users.

Best Answer chosen by Admin (Salesforce Developers) 
Devender MDevender M
Hi Solip,

You can use field set. If new fields are created u can simple drag and drop in field set.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm

Hope this will help

All Answers

Devender MDevender M
Hi Solip,

You can use field set. If new fields are created u can simple drag and drop in field set.

http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm

Hope this will help
This was selected as the best answer
SolipSolip

Thanks for taking time out to answer my question. Field sets would still require maintenance whenever a field is added to the object. I think I'll just go with describe/repeat/inputfield.