0

I have a custom back button in standard account page that is overridden by a vf page. When I click on back button it should go back to a custom search page that contains some values say like this:

image

but now it is redirecting to a page where no values are present

enter image description here

I have tried onclick javascript too as window.history.go(-1). It is taking me to the empty page.

My custom button

enter image description here

  • Could you please provide your code? – Martin Lezer Jan 18 '17 at 13:45
  • on search put the search params in your current page url, then use those to search off of. Then when you go back the parms will be in the url and if you changed your search to use those you should be good. – Jesse Milburn Jan 18 '17 at 13:46
  • I'm using this button on the standard account page.when I clicked on back button just i'm redirecting to that page – Rv1 Jan 18 '17 at 14:12
  • Yes, but when you click search if you put your parameters in a url for the same page and load the page again. Utilizing the url with parameters the user entered you can then perform the search using those parameters/fill out the fields. The web by nature is stateless so the parms will have to be passed to the new page. For an example go to Amazon and search for an item. Then click the filter criteria on the left, you will notice that the url now holds the filter (search) criteria. So when you go forward on an item then go back you still have the filter/search criteria. – Jesse Milburn Jan 18 '17 at 15:47
0

You can use setRedirect(false) when you navigate from one page to another Page. But condition is that both Pages Must have the same controller.

for reference check SetRedirect

  • as you are using standard account page you can use standardcontroller="account" and extension="yourController". this might help. – Manjot Singh Jan 18 '17 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.