cancel
Showing results for 
Search instead for 
Did you mean: 
Dingo
Nintex Newbie

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

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.

Labels: (1)
0 Kudos
Reply
1 Reply
jpmhuls
Nintex Newbie

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

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".

0 Kudos
Reply