0

I know this has been asked and answered many times but I seem to be lost in my code at this point. I have a flow that has a record create element at the end. I have wrapped the flow in a VF page and I am trying to direct the user to that record when the user hits the finish button. So far I am getting an invalid URL error when I finish.

Here's the controller

    public class ForeignWireEntryController {

    public Flow.Interview.Foreign_Wire_Request FWREntry{get;set;}

    public String getrecordid() {
        if(FWREntry==null) return ' ';
        else return FWREntry.recordid;
}

public PageReference getOID(){
    PageReference p = new PageReference('/cs54.salesforce.com/apex/' + FWREntry.recordid );
    p.setRedirect(true);
    return p;
    }
}

And the VF Page

<apex:page Controller="ForeignWireEntryController" TabStyle="Foreign_Wire_Request__c">
<br/>
<flow:interview name="Foreign_Wire_Request" interview="{!FWREntry}" finishLocation="{!recordid}" />

1 Answer 1

-1

I believe all your need to do is created a finish screen in the flow, you can then parse the record id as a url. Redirecting the user that way.

https://help.salesforce.com/articleView?id=vpm_url_set_retURL.htm&language=en_US&type=0

Once that is set up look to configure the flows finish behaviour.

https://developer.salesforce.com/docs/atlas.en-us.salesforce_vpm_guide.meta/salesforce_vpm_guide/vpm_distribute_internal_vf_finish.htm

3
  • Thanks. I have a finish variable that contains the recordid. How do I parse this automatically? Aug 15, 2017 at 15:26
  • Updated the original post for you :)
    – Nebbyyy
    Aug 15, 2017 at 15:41
  • @Nebbyyy Please include the relevant information in the actual answer, as links may change over time. See How to Answer for what makes a good answer.
    – sfdcfox
    Aug 15, 2017 at 22:50

You must log in to answer this question.

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