3

I have an href on a visual force page that takes the user back to the previous page using javascript. It works fine on desktop browsers, but does not work on the mobile site or the salesforce 1 app. What can be done to have support across all devices?

This is the current set up

<a href="history.back();" onclick="history.back();">Back To Quote</a>
1

You'll want to look at the Managing Navigation Section of the Salesforce1 Mobile App Developer Guide, particularly Navigation with the sforce.one Object.

You'll need to add Javascript to your page to determine if you're in Salesforce1 which then sets the navigation link accordingly if it returns true because the back button works differently in Salesforce1 than in the standard platform from a regular browser. Your code will need to be adjusted to take this into account. Within SF1 you can't directly manipulate the browser URL using window.location.href and similar callouts as this doesn't work well with the Salesforce1 navigation management system.

| improve this answer | |

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.