3

I have a bit of a pickle. I have overloaded my custom object's view page with a VF page. This means that it can be invoked, using native functionality, from all kinds of places (search, related lists, etc). For this reason, I cannot count on parameters being passed to it.

I am trying to evaluate what page is the "referrer" to where I am. This is, the previous page.

In the desktop version, this: document.referrer or ApexPages.currentPage().getHeaders().get('Referer') work perfectly fine.

However, in the SF1 version of the page both return: https://na31.lightning.force.com/one/one.app, which is useless to me.

Any ideas?

  • Do you just need to know the referer or potentially navigate back to it? If the latter, you can use sforce.one.back(true) – Gaurav Kheterpal Dec 29 '15 at 4:16
  • I need to know the referrer, unfortunately. – Sebastian Kessel Dec 29 '15 at 5:42

Your Answer

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

Browse other questions tagged or ask your own question.