You need to sign in to do that
Don't have an account?

Allow users to choose fields for edit form
Hi,
I am currently in the process of building a custom ui which allows for mass edit of records from a resultset.
I currently have the edit form wrapped in a DataTable and all fields are hard-coded.
My question is: Is there a way to setup a way to allow users to select which fields they will be editting?
I am not sure if DataTable is the correct approach to this. Everything is working in terms of hard code, but I wanted to know if there is something more dynamic.
Ideal situation: User gets a selection criteria (like the old report editting pages were setup, checkbox per field to display) then click next to get to the edit form containing only the fields they selected.
Thanks,
No you don't need a standard controller for use of fieldset. And for the error, you are trying to use dynamic binding with a list of records, it should be with one of them only i.e. projresults is a collection, you can never get a field value out of a collection, it should be single record
This code should work:
All Answers
Field Sets seems to be solution for this, please have a look at the official docs here : http://www.salesforce.com/us/developer/docs/pages/Content/pages_dynamic_vf_field_sets.htm
Hi,
For your requirement, you can use wrapper class so that you can display radiobuttons infront of all records. User can select the records and can edit those. Wrapper class helps you to identify the selected records. Check the below link to know how to use it.
http://wiki.developerforce.com/page/Wrapper_Class
Thanks,
MVP
Can these fieldsets be used on custom objects? I haven't come across any info for it yet. EDIT: Found it under the custom object page
Our system is built completely out of custom objects (2x main objects for tracking per client) - we do operate as a normal SFDC environment (Opps, Leads, etc.)
Also, For the post above about the wrapper class. I believe I have achieved what this is showing. Correct me if I am wrong but that is for selecting which records you would want to update? If so, that is working. Now the case is to give the user the ability to select which fields they want to edit.
Example: Rather than editting Name, Address, City, State they can select Address, Comments, Status, Stage, etc.
Again, thanks for your help on this
Another Question: Does the VF page have to be set to have a StandardController for the sObject you want to use with the fieldset?
I found this: http://forceguru.blogspot.com/2011/02/using-field-set-on-visual-force-page.html
I currently have 2 objects called within my controller so I cannot set it to be a StandardController, is it required?
"Error: Incorrect parameter for subscript. Expected Number, received Text" keeps getting generated when I try to apply the Repeat of Output Text on my result set.
Test Repeat:
Piece of Controller:
No you don't need a standard controller for use of fieldset. And for the error, you are trying to use dynamic binding with a list of records, it should be with one of them only i.e. projresults is a collection, you can never get a field value out of a collection, it should be single record
This code should work:
ah, that makes sense but still isn't working - nothing shows up when compiled and ran.
Above the area I am testing I have a datatable which returns the same dataset and that is working.
EDIT: I didn't have it wrapped in my update panel ^_^ Going to do some more testing and get back
This works!
Thanks for your help!
Now I am going to investigate giving the end user the ability to change the repeat FieldSet.xxxx value.
If you have any information on that it would be greatly appreciated :)
I am assuming I will have a Get/Set function within the controller which controls the string that will be pushed into the Inner Repeat Value. User would control with a drop down or radio button, something along those lines :)
Just to follow up on this, I got it to work so if anyone needs in the future:
It is a drop-down list that controls which FieldSet is shown
I'm glad it worked :)