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

How to pass visualforce page record ID to controller
Hello Friends,
I have a requirement to get child records and display in VF page and update all records when they click save button, could you please send me the link or sample code if there is one?
VF page
checkbox Field1 Field2 Field3 Field4
- - - - -
- - - - -
Save Button
If they click save button all selected checkbox records should be updated via Apex controller or Javascript function.
I am able to get the records to VF page but I couldnt get the selected record ID and pass it to controller
Any help on this really appreciate.
thanks
I have a requirement to get child records and display in VF page and update all records when they click save button, could you please send me the link or sample code if there is one?
VF page
checkbox Field1 Field2 Field3 Field4
- - - - -
- - - - -
Save Button
If they click save button all selected checkbox records should be updated via Apex controller or Javascript function.
I am able to get the records to VF page but I couldnt get the selected record ID and pass it to controller
Any help on this really appreciate.
thanks
Sorry for this issue you are facing.
May I suggest you please refer to below link from the stack exchange community with a similar discussion which might help you further.
- https://salesforce.stackexchange.com/questions/180461/actionsupport-pass-record-id-to-controller-from-apexrepeat
Please let us know if this helps.Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
Please have a look to below code:
Apex Controller:-
VisualForce Page:-
Here is a visualforce page containing a list of teams. What we want is after clicking a particular team name, it will go to a page where the details are displayed of that corresponding team. Here we are retrieving the team id using <apex:param name="id" value="{!t.id}"/> within commandLink where we defined the action.
Then we can observe that we defined that function in the apex controller for getting that id by System.currentPageReference().getParameters().get('id'); After that it is referenced in a different page with that id.
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.
Thanks,
Ajay Dubedi