function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nicholas MiramsNicholas Mirams 

Visualforce page Finishlocation using flow

Hi,
I have a custom button attached to a visualforce page: -

<apex:page StandardController="Lead" lightningStylesheets="true" showHeader="false">        
    <flow:interview name="Leads_Mass_Take_Ownership_Button"
          finishLocation="{!IF($User.UITheme == 'Theme4d' || $User.UITheme == 'Theme4t','/lightning/o/Lead/{!Lead.Id}','/{!Lead.Id}')}">
        <apex:param name="VLeadid" value="{!Lead.Id}"/>
    </flow:interview>
</apex:page>

Once clicked on the flow runs to Update the Lead Status and also change the owner form a queue tot he current user.

This seems to work ok but I cannot get the page to redirect back to the Lead record where the button was clicked after the flow is complete.  It works ok in Classic but not lightning, any ideas on how to help me.

Asuming this is the best was to update two fields on screen via a button

Thanks