I'm trying to integrate a Custom VisualForce Page in Lightning experience and I'm facing some issues with navigation. My question is how can I detect where the user accesses my custom page from? For example:
I'm overriding the Account's Edit button so when I want to edit an Account I use my custom VF page for that. But I can access the edit page from the Account's listing page and from the record's detail page. Please see the screen shot below:
- Edit from Account's listing page:
- Edit from the record's details page:
Does anyone knows a way I can 'tell' my controller that the user is coming from the detail page or from the object's listing page so I can use this to redirect back to the relevant page? I would appreciate any help! Thanks!