Discussion

How to start a flow from a click of a button/link

Hi, How can i start a specific flow by clicking on a button or a hyperlink? Can it be done? As of my knowledge i know that we can use .pyFlowName property to set the particular flow and giving a button of type AddNewWork. But still it is not working and i am getting an error: Errors: Originating Organization:Value can not be blank Label:This field may not be blank. And how this can be done for a hyperlink? Please clarify me.

***Updated by moderator: Marissa to close post***
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

September 10, 2008 - 11:07am

Two Options for you;

1] If you want to create a new workobject on click of a button then Create your own activity say TestActivity for that button and call CreateWorkProcess Activity from TestActivity. This activity requires Organization name and Flow Name as parameters

2] If you want to run a flow (without creating workobject) then from the TestActivity give call to StartFlow Activity,where you need to pass Flow Name as parameter

Hope this helps.

September 12, 2008 - 6:11am

By using Hyperlink use this code:
<script>

function CreateWO()
{

var activitypath=reqURI+"?pyActivity={Class Name}.{ActivityName}";
window.location = activitypath;
}

</script>

<table>
<tr>
<td>
<big><strong><a href="javascript:CreateWO" title="Create Work Object" ><U>Create WO</U></a></big></strong>
<td>
</tr>
</table>

U might need to customize as per your requirement.
Hope this helps too.

September 12, 2008 - 6:27am

<a href="javascript: openWorkByURL('pyActivity=classname.activity name&WorkPageClass=Workpage class,'Work');"><li><B>Link name for display inside portal gadget</li></B></a>

July 1, 2014 - 12:06pm

I want to start a flow without creating a work object and then create the work object once a button is clicked. I want the user to click the income button to go into the income section (no work object created) from the income section click "create new income budget" button (from that button click, create the work object). 

So, could I create the TestActivity that calls both CreateWorkProcess activity and give call to StartFlow Activity,where you need to pass Flow Name as parameter? Would that work, what do you recommend?

September 1, 2015 - 3:35am

Hi,

You can write an custom activity and set the property .pyOrigOrg to your organization, pyFlowname, .pyLabel etc. properties on this page you can call Add activity.

This custom activity would be called either from link or button

September 1, 2015 - 3:35am

Hi,

You can write an custom activity and set the property .pyOrigOrg to your organization, pyFlowname, .pyLabel etc. properties on this page you can call Add activity.

This custom activity would be called either from link or button