I have a VF page containing a flow. The VF page uses a Standard List Controller pass a list of records (Contacts) to the flow. I've added a List Button and added it to the List layout, and this works. But I need to change the end of flow behavior. According to the docs, you can specify a
finishLocation on the flow in VF to specify where the User ends up after the flow.
The client would like to send the user back to the original list view (whichever view was selected) after the flow. Is this possible? I added a controller extension to check the referer header (
ApexPages.currentPage().getHeaders().get('Referer')), but that is only returning a base URL (e.g.,
https://force-drive-3563.lightning.force.com/) in LEX. Just redirecting to the LEX generic list view url (
/lightning/o/Contact/list) without specifying
filterName always displays "recently viewed" contacts. Is there any way to determine the originating view and to send the user back to it after the flow?