You need to sign in to do that
Don't have an account?
Paul Foley
Visualforce refresh page and keep additional query string parameters
I'm having some trouble retaining a query string parameter on a page when i save it.
My URL is along the lines of:
https://c.cs22.visual.force.com/apex/testPage?id=ABC123&uid=37b5a9a2-4541-46ad-b10a-fc4592793070
Where ABC123 is the id of the record I'm referencing.
Whenever I click the save button, and the save function is called in the corrosponding Apex class it redirects the user back to the page as expected, but the second parameter (uid) is missing.
I've included the guts of my save function below
My URL is along the lines of:
https://c.cs22.visual.force.com/apex/testPage?id=ABC123&uid=37b5a9a2-4541-46ad-b10a-fc4592793070
Where ABC123 is the id of the record I'm referencing.
Whenever I click the save button, and the save function is called in the corrosponding Apex class it redirects the user back to the page as expected, but the second parameter (uid) is missing.
I've included the guts of my save function below
public PageReference save(){ PageReference currentPage = ApexPages.currentPage(); Map<String,String> currentPageParameters = currentPage.getParameters(); PageReference nextPage = new PageReference('/apex/testPage'); nextPage.getParameters().put('uid',currentPageParameters.get('uid')); // a bunch of code to actually save the data. return nextPage; }I've tried a couple of examples from other pags but had no joy getting this working.
Edwin Vijay
try this