We are using a list button that calls a visualforce page which execute a flow. Basically we want to delete specific cases from a list view in "Bulk".
We want to know if it's possible to return to the initial list view where the user have perform the action and not the list view that is "pinned" by the user.
We have the following visualforce page code:
<apex:page standardController="Case" recordSetVar="Cases" lightningStylesheets="true">
<div style="max-width:350px;text-align:center;margin: 0 auto;">
<flow:interview name="CloseSelectedCases" buttonLocation="bottom" buttonStyle="background-color:rgb(27, 82, 151); color:white;"
finishLocation="{!URLFOR($Action.Case.List, $ObjectType.Case)}">
<apex:param name="varCases" value="{!Selected}" />
</flow:interview>
</div>
</apex:page>
As you can see we are using the Action.Case.List to return to the list view of cases. We don't have any custom controller for now, but we are open to use one if necessary.