vadim.tabakman@nintex.com

Manually Start a Workflow without clicking the Start Button

Blog Post created by vadim.tabakman@nintex.com Employee on Mar 25, 2016

When you build a workflow on a SharePoint list, you can configure it to start manually.  That means you click on the item you want the workflow to run on, select Workflows from the drop down menu, click on the workflow and then you click the "Start" button to start an instance of that workflow.

 

If you have start form workflow variables, then this makes sense.  But if you have no start form variables, it seems like it'd be nice to just click the name of the workflow and it just starts the workflow.

 

To get this to work, we are using Nintex Forms with Nintex Workflow.  When you have your workflow design open, in the ribbon, click on Workflow Settings.  When that pops up, click the drop down called "Edit Task Form" and then select "Edit with Nintex Forms".

 

CustomizeStartForm.pngWe aren't going to do anything with the form design, because the plan is to not really see it.

When the Form designer comes up, click on Form Settings and expand the Custom Javascript section.

 

Javascript.png

 

 

The Javascript is below.

 

NWF$(document).ready(function()

{

  var obj = NWF$(".cssSubmitButton");

  obj.click();

});

 

Finally, since the Javascript is looking for an object with a particular CSS class, we need to double click on the Start button on the form design, and set cssSubmitButton as the CSS Class.

 

CssClass.png

Now, when you go to start the workflow, the form may briefly come up, but will disappear and the workflow will start.

I hope this helps.  If you have an questions, please feel free to add them to the comments section.

 

Vadim Tabakman

Outcomes