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
wlevywlevy 

Restore page state after navigation

My application uses a central "launch" page in which the user drills down to reveal levels of detail and then can click detail links to navigate to various edit pages and reports. Each of these pages includes an apex:composition tag referencing a common template. The template page includes a link back to the launch page.

 

The challenge is to restore the launch page to its prior (drilled down) state when the user returns to it after navigating away. To do this we need to keep track of a handful of ID variables. Depending on how far the user drilled down, some of these ID variables may be null.

 

I'm looking for a good technique for keeping these variables in scope. I suppose they will have to be passed back and forth as querystring parameters? Is there a better way?

 

Thank you.

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

As far as I'm aware there are three ways to achieve this:

 

(1) Use the url parameters as you currently are

(2) Store the information in a custom setting associated with the user

(3) Store the information in the database - we've done something similar (though not the same) in a custom object with a lookup to the user so that we can retain it across sessions also.

All Answers

bob_buzzardbob_buzzard

As far as I'm aware there are three ways to achieve this:

 

(1) Use the url parameters as you currently are

(2) Store the information in a custom setting associated with the user

(3) Store the information in the database - we've done something similar (though not the same) in a custom object with a lookup to the user so that we can retain it across sessions also.

This was selected as the best answer
wlevywlevy

Thanks! I'm going with the custom settings route.