I created a visualforce page with an embedded flow. If the flow is finished the new record is opened. So far so good the flow works fine, but the seconed screen with the finish button is not so good. Is it possible to bypass this screen? It would be great if the first screen is done the new record will appear.

I tried it also with a action item in flow to navigate to the new record, but then I get always an error "Error Occurred: This flow contains local actions, so this flow runs only in Lightning runtime."

<apex:page standardcontroller="Account" extensions="Account_Redirect2" lightningStylesheets="true" >
   <flow:interview interview="{!myflow}" name="account_create" finishLocation="{!finishlocation}"/>
public class Account_Redirect2 {

    public Account_Redirect2 (ApexPages.StandardController controller) {


public flow.interview.account_create myFlow {get;set;}

    public Account_Redirect2() {
    public String getendID() {
        if (myFlow !=null) 
            return myFlow.stored_new_recordid;
        else return 'home/home.jsp';
   public PageReference getFinishLocation() {
        PageReference endlocation = new PageReference('/' + getendID());
        return endlocation;


1 Answer 1


Here the solution for my problem https://salesforcesidekick.com/2017/07/24/how-to-set-the-flow-finish-behavior-to-a-newly-created-record-without-an-additional-screen/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .