7

I'm working on an S1 app, I'm using the S1 back arrow to nav back from one page to another. I'm noticing however, that the pages I am navigating back to are not refreshing, this is a problem because I start off on a page with some data on it, I tap on that block of data and am taken to an edit page where I can make changes to that data. When I've made my changes, my only way back to the original page with the data is the back arrow. I have to then manually refresh the page to see my changes.

What I'm wondering is, if there is a way yo listen out for the S1 back arrow and perform an action on a page which has been navigated to using that arrow?

4

Or could you specifically navigate back to the record after editing? Is this in Visualforce? Via JavaScript, more here:

http://www.salesforce.com/us/developer/docs/salesforce1/Content/vf_dev_best_practices_navigation.htm

What you are running into is fairly standard browser behavior these days ... both desktop and mobile. To increase performance, the back button is probably offering you a cached version if it has one available (and it probably will in that flow). You can try can catch the onunload event of the window, but that won't spare you from the cached view necessarily.

3

You can navigate back yourself using sforce.one.back(true); with the parameter indicating the page should reload if possible.

Would that work?

You can listen for back button events, but it is really tricky to get what you would like working.

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.