+ Start a Discussion
MicheleMcgeoyMicheleMcgeoy 

Pass variable from flow to VF page

I'm new to Visual Force, so please forgive the basic question...

 

I created a simple flow that does a lookup by name and then I assign the variable {!flowContactID} to the found contact id. I then want to send the user back to the screen for that contact. In the flow, I set {!flowContactID} as input/output

 

<apex:page >
<flow:interview name="Test_Contact_Add_and_Exit" finishLocation="{!URLFOR('/'&{!flowContactID})}"/>
</apex:page>

 

I get a syntax error with the Visual Force page above. Do I also need to declare the {!flowContactID} variable within Visual Force?

 

Thanks, Michele

Vinita_SFDCVinita_SFDC

Hello Michele,

 

Try this: <flow:interview name="Test_Contact_Add_and_Exit" finishLocation="{!URLFOR('/{!flowContactID}')}"/>

 

Also refer following threads referring similar issue:

 

http://boards.developerforce.com/t5/forums/forumtopicprintpage/board-id/visual-workflow/message-id/912/print-single-message/false/page/1

 

http://boards.developerforce.com/t5/Visual-Workflow/Flow-variables-not-passing-back-to-VF-Controller-Extension/m-p/504513#M803

MicheleMcgeoyMicheleMcgeoy

Hi Vinita:

Thanks for your suggestion. It did get rid of the syntax error, but it did not return me to the contact record I was looking for. It just sent me back to the home page.

 

I read through the links you suggested, but I am not an Apex coder and was not able to decipher much of it. Please forgive my lack of experience, but I would think it would just be a few lines of code to pass this variable in between. I don't have big aspirations of becoming an Apex coder, but I do want to able to use the power of these flows.

 

Any pointers on a simple solution?

 

Thanks, Michele