5

I am creating a record using a visual workflow and would like to be able to open the object I created within the flow in edit mode when the user clicks on the finish button. I am using the flow:interview methods from a visualforce page.

<flow:interview name="Create_Project" finishLocation="{!URLFOR('/a0B/o}')}}"/>

I don’t seem to be able to pass an output variable to the URLFOR method.

In another example I have used the URL method to pass parameters to a flow but again I have the same problem that I cannot end up at the created object.

/flow/Create_Project?Account_Name_Input={!Account.Name}

Any help would be appreciated.

4 Answers 4

2

Found this; does it help? I'm not aware of any non-Apex way of doing this... yet! https://developer.salesforce.com/forums/ForumsMain?id=906F000000097pVIAQ

1
  • Thanks. I had seen this but was hoping for a more simple route :)
    – user6784
    Commented Feb 11, 2014 at 16:20
2

Here's a tip I got from Jeff Bloomer at https://developer.salesforce.com/forums/?id=906F00000009AgOIAU

Here's what worked for me. I also have a flow that starts from the Account screen. The code for my button is:

/apex/Customer_Service_Request?txt_AcctID={!Account.Id}

Then, the code I used for my Visualforce page was:

<apex:page >
    <flow:interview name="Customer_Service_Request" finishLocation="/{!$CurrentPage.parameters.txt_AcctID}"/>
</apex:page>
0

Create a variable of type "Input" with a Unique name that matches the URL parameter.

/flow/Create_Project?Account_Name_Input={!Account.Name}

Variable name would be "Account_Name_Input" Type defaults to Private, you must change it to "Input". If you fail to change it, you won't see the passed value.

0

The CodeFriar wrote a brilliant reusable redirect controller for Visual Flow. You only have to install it, and can re-use it for any flow. http://codefriar.com/2014/04/18/a-reusable-redirect-controller-for-visualflows/

You must log in to answer this question.

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