You need to sign in to do that
Don't have an account?
passing records using checkbox to next VF page
Hello,
I am new to salesforce and needed some help regarding passing records using checkbox to next VF page...
I have created a custom object with some text fields and i have created a VF page in which i have displayed these fields along with a checkbox.Its somewhat like a checkbox in a datatable kind of look.
Also i have created a wrapper class that holds the selected(checked) records.Now i want these checked records to be retrieved and displayed in the next VF page on passing it as a url parameter in page reference.
How is this done? Is there any other way of doing this apart from passing it as a url parameter.
Please help...
Thanks
Use same controller on both pages.
Code your constructor method that do not initialize values for parameters that you want to pass (load of second page will make it null if you do not do it).
If (yourparameter==null){
yourparameter='default value';
}
Nash
Thanks for your reply...In my case i am using two different controllers,so how do i proceed with it?
In this case, save values in object and pass Id of saved record to second page. Use Id to query values to be used on second page.
Nash
I have saved the selected records in the wrapper object and when i pass this wrapper object to next page,the whole record as well as the id of the record is getting passed.
something like this
https://c.ap1.visual.force.com/apex/pagename?value=%28Object__c%3A%7BName%3DABC%2C+Id%3Da0O90000001DDAgEAO%2C+Field__c%3D10.00%7D%29
so how do i retrieve the id seperately from this string to query the values?how do i query for multiple ids?