I'm having a VF page where I save the values of name and email.Now I have to pass this values into another page and need to display their.
Note: I'm saving values of name,email into Account,Contact directly through trigger....I'm not having any custom object for this.
Attribution to: Eagerin Sf
Possible Suggestion/Solution #1
You might use the tutorial for making a multi-page wizard.
Or if there's not too many parameters, pass them through URL (best would be to use ApexPages.PageReference, getParameters() gives you a map, you can put values there. But if you really want, you can craft the URL string by hand).
Attribution to: eyescream
Possible Suggestion/Solution #2
You could use pagereference class I would have this code on the commandbutton of the first VF page
PageReference pr = new PageReference ();
pr = Page.VFpage; // use the name of the second VF page
pr.setRedirect(true);
pr.getParameters().put('Pstartdate',string.valueof(startdate1));
pr.getParameters().put('Penddate', string.valueof(enddate1));
This should redirect to second VF page with the parameters in query string
and capture these on the constructor of controller of the next VF page using
startdate1=date.valueof(ApexPages.currentPage().getParameters().get('Pstartdate'));
enddate1=date.valueof(ApexPages.currentPage().getParameters().get('Penddate'));
You should have these ready to be used in the second VF page
Attribution to: Prady
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/4189