In order to take advantage of the standard set controller in Lightning Experience we have a slightly convoluted setup.
We have:
- Using Lightning Experience.
- A Visualforce page and controller that works out which records are selected and creates...
- A Lightning Component.
The Lightning Component can also be embedded as a Quick Action.
The difficulty we have is implementing a 'Back' or 'Cancel' button in the component that will direct us to the right place (the referring page) when embedded in VF.
We have managed to get the 'closeQuickAction' event to bubble up to the Visualforce page, and can instruct the page to re-direct successfully. However, we can't find where to send the user to.
E.G.
From a list view, the user clicks on the List Button, to get into the Visualforce Page. How do we get the user back onto the List View with the right filter selected?
We have tried:
ApexPages.currentPage().getHeaders().get('Referer');
However, this just gives you:
https://OUR-DOMAIN/one/one.app
Any ideas?