JavaScript Function (Button OnClick) on SharePoint 2016 page to start Nintex Workflow

  • 28 August 2019
  • 1 reply
  • 200 views

Badge +1

Greetings,

This is for SharePoint Server 2016. 

There have been posts that allege to address this, but they are way more complicated than I need. I created a button (input class="bigRedButton" onclick="startMyWorkflow()" type="Button"). I have a simple site workflow that does stuff. I need a javascript function that, when a user presses the big, red button, will start the workflow. That's all. Please do not include functions that are designed to work in SharePoint Online, because they won't work on prem.


1 reply

Userlevel 2
Badge +11

Hi @Dingo,

If it is for a particular list or library page, you could consider adding a Custom action button to the ribbon using SharePoint Designer 2013.

Otherwise if you still want to use JS, here's a snippet from one of the solutions I worked on:

workflowURL = siteRoot + "/_layouts/NintexWorkflow/StartWorkflow.aspx?List=" + listGUID + "&ID=" + goTo +"&WorkflowName=" + workflowName + "&Source=" + item;
window.location.href = workflowURL;

NB: I'll assume you've enough JS experience to "fill in the blanks".

Reply