You need to sign in to do that
Don't have an account?
jisakc1
calling workflow from a visualforce page command button
I have a visual force page with a custom controller and extension. On the page I have a button that I want to call a workflow to collect some info and then send an email to a group. When the workflow is done I want to return to the original visual force page that had the button. Is this possible? I can't seem to save a visualforce page with an embedded workflow. I get an error that says the tag <flow:interview> is unknown when I create it through the eclipse IDE or an error that the parameters I want to pass do not exist if I try to do it through salesforce. It seems it wants me to create a new controller for the new page and then run all the same code again from the original page to set the parameters all in order to set the finish attribute. Is that correct? Seems like a lot of work for something that should be so simple. Can you set the finish location in the workflow itself? That seems the reasonable thing to do.
Please follow these related links:
http://help.salesforce.com/HTViewHelpDoc?id=vpm_admin_add_flow_to_vfpage.htm&language=en_US
http://www.salesforce.com/us/developer/docs/pages/Content/pages_flows_adding.htm
Hope these links will help.
Thanks
Vikash_SFDC
--------------------------------------------------
<apex:page >
<apex:pageBlock title="Quick Flows" >
<apex:form >
<apex:commandButton action="/flow/Enter_Data" value="New Data" />
<apex:commandButton action="/flow/EnterNewData" value="New Account" />
<apex:commandButton action="/apex/UploadDocument" value="Attach Document" />
</apex:form>
</apex:pageBlock>
</apex:page>
-------------------------------------------------
However, I have not been able to find how to set the Finish Location when using the commandButton. I cannot figure out syntax that allows the standard finishLocation="{!URLFOR('/home/home.jsp')}" to work within the button action--whatever I try returns an error.
If anyone can help improve the structure of the code here and/or add the finishlocation function, please share. Thanks.