function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
PedroLPedroL 

Search Functionality for Cases

 

Hello,

 

I'm trying to reproduce the search functionality to customize some specific filtering for cases. I have been successful in getting the search to return the desired list and displaying and paging through the list of cases. I’m still missing an important part which will allow the user to drill down on a case (by clicking on the case link in the list) and return back to the search results.

 

Whenever I hit the back button to go back to the previous page, I’m returned to the original Visualforce page which contains the blank filtering criteria and of course, no results. This is to be expected and the constructor for the controller is being executed and a new search is performed.

 

Ideally I would like to return to the same search page result from where the case was called, including the appropriate page. I’ve noticed that the standard search keeps some parameters on the URL on the search page as well as on the detail page for the case selected.

 

Any ideas on how this is accomplished?

 

Thanks,

 

Pedro

bob_buzzardbob_buzzard

You'll need the search string as a URL parameter in order for the browser back button to re-execute the search.  You'll also need to add a page action attribute that invokes a method to retrieve the parameter and execute the search.

 

To get this parameter written to the URL in the first place, I think you'll need to change your action method that carries out the search to put the search string into the page parameters and carry out a client side redirect.