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 ZuaroNicholas Zuaro 

Need to end a flow on a specific page Created by flow.

Hello,
I'm trying to create a handy little time-saving flow-powered button to help people create a New Sales Order as quickly as possible.
So the button is located on the Account page, so this way, it already has all of the accounts information to enter into the Sales Order. So basically, the flow looks up the account, Creates a Sales Order, and then is finished. 
I wanted the user to be redirected to the Sales Order they just created.
My button looks like this:

/apex/NewSOManager?vExistingAccount={!Account.Id}

NewSOManager is a visualforce page like this:
 
<apex:page > 

    <flow:interview name="New_Sales_Order_From_Account_Page" 
        finishLocation="/{!$CurrentPage.parameters.New_SalesOrder_ID}">
    
        <apex:param name="New_SalesOrder_ID" 
            value="{!$CurrentPage.parameters.New_SalesOrder_ID}" />

    </flow:interview>

​</apex:page>

Now I'm EXTREMELY new to Apex/Visualforce, etc. and just coding in general.
After doing some more research it is to my understanding that I need to write the code for a controller or something and I've been looking through the documentation and the books that I have and I just can't figure out how to write it all from scratch with what little knowledge I have.
I'm just trying to get everything that I'm going to need squared away.
So i'm only going to need 1 visualforce page?
and 1 "controller"?
and is my visualforce page even remotely on the right track?
How do I build a controller from scratch?
Sorry I know I'm asking a lot but I need some help, I have nothing to go on and a deadline to meet!
Thanks so much in advanced for your help!
Andy BoettcherAndy Boettcher
Check out my blog post on this:  https://techman97.wordpress.com/2013/10/18/flow-and-finishlocation/

Good luck!  =)