Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

What was the previous page?

KrantiRanginen1
Collaborator II

Hi, is it possible to find out which page the user was coming from?

 

I need to know whether the user is navigating to the record in question from another cross referenced record, or directly from the dashboard / report. Is it possible to get this information through a custom object ? Need to change the behaviour of a "Save and Close" custom button depending on where they came from.

3 REPLIES 3

DavidPetty
Archer Employee
Archer Employee

Kranti, take a look at HTML DOM referrer Property to see if that helps in any way.

 Advisory Consultant

Hi David - I did stumble upon the document.referrer property a few days ago and tried it - it works for the first time when a record is opened (referrer shows the URL of previous page) - but if we save the record after is it opened, then the referrer is reset to the current page - so on saving we lose track of previous page.

 

Any idea what property is used by the 'Close' button which just redirects us to the previous page? I tried browsing through the code for close button but no luck.

Try storing the document.referrer in a session storage variable.

 

The close button is using asp.net "breadcrumbs" (viewstate) to go back to where the user originated from.

 Advisory Consultant