You need to sign in to do that
Don't have an account?
nikhl.manekar@mitchell.com
Display visualforce text after every step of workflow on same VF page
Hello Everyone
I have created a VF workflow. And connected it to an visualforce page.
Step 1 user chooses Account.
Step 2 user chooses/ creates contact
step 3 ....
now What I am trying to achive is display in the seperate <div> in the lower section of the screen what the user has selected so far.
Like You selected account : XYZ
You selected contact : PQR
but I want this text to appear dynamically as per the flow of the steps
How can I do it.
Thanks in advance for your help.
-Nikhil
Store what you want to show in a variable in flow - make it Output only. For this sample say you have 2 variables vaAccountInfo and vaContactInfo which have the text you want to display stored as the flow progresses..
In your VF page do something like this:
<apex:page controller="MyFlowController">
<flow:interview name="MyFlow" interview="{!aFlow}" rerender="showOutput"/>
<apex:outputPanel id="showOutput">
{!showAccount}
{!showContact}
</apex:outputPanel>
</apex:page>
Your controller is something like this:
public class myFlowController {
public Flow.Interview.MyFlow aFlow {get; set;}
public String getShowAccount() {
if (aFlow==null) return null;
else return aFlow.vaAccountInfo;
}
public String getShowContact() {
if (aFlow==null) return null;
else return aFlow.vaContactInfo;
}
}
Hope this helps..
All Answers
Store what you want to show in a variable in flow - make it Output only. For this sample say you have 2 variables vaAccountInfo and vaContactInfo which have the text you want to display stored as the flow progresses..
In your VF page do something like this:
<apex:page controller="MyFlowController">
<flow:interview name="MyFlow" interview="{!aFlow}" rerender="showOutput"/>
<apex:outputPanel id="showOutput">
{!showAccount}
{!showContact}
</apex:outputPanel>
</apex:page>
Your controller is something like this:
public class myFlowController {
public Flow.Interview.MyFlow aFlow {get; set;}
public String getShowAccount() {
if (aFlow==null) return null;
else return aFlow.vaAccountInfo;
}
public String getShowContact() {
if (aFlow==null) return null;
else return aFlow.vaContactInfo;
}
}
Hope this helps..
Thanks for reposne !!
My probblem with this approach is
even though myflow == NULL
it is displaying the value of vaAccountInfo
public Flow.interview.CDP_Flow myflow { get; set; }
public String getAccountInfo() {
if (myFlow==null) return null;
else return myflow.vaAccountInfo;
}
like You selected account {141002dd7b50793894476c7273d2139fe2d83ea-7101}
Please let me know what can be wrong.
Thanks
Hello All,
Sorry it was my mistake I initialsed the vaAcountInfo variable with something that was the problem.
Thanks @Rajaram for helping on this one.
Also thanks for posting code on git. sharing the link for everyone else https://github.com/raja-sfdc/FlowShowAsYouGo