SharePoint 2016 – Automatically Starting On-Premise Nintex List Workflows without Start Page
So, just been battling with a particularly annoying feature within SharePoint and Nintex Workflows, it was annoying enough for me to blog about it – lucky you.
Background
I have a client who wants a workflow to start automatically when the workflow is initiated from a custom action/ribbon button on a list item – I had thought it should be simple enough as I had done it by hacking the URL within SharePoint 2010, however that appears to have changed somewhat for 2016.
The default behaviour is to show the Start Workflow page as so (which would normally allow the user to provide parameters – but when there are none, whats the point!? ):
Solution
So after some googling I found some references to using the wfstart.aspx page, but I could not get this working, presumably to do with lack of a SubscriptionID used with SharePoint Online.
Next, I found some mentions of changing the workflow settings to remove the StartWorkflow URL from here. This was the ticket that led me to the answer:
- Open the Nintex Workflow designer for the workflow in question
- Go to Workflow Settings
- Under Workflow options, select Custom within Form type
- This will give you another setting Start page
- As a bonus, you can actually set the Enable workflow to start from the item menu checkbox to add this button to the item edit drop down
- Next time you click the button it will automatically start the workflow
Bonus Extra
If like me, you want the button to appear on the ribbon as well as the item edit drop down, you can do the following:
- Open the site and then list in SharePoint Designer 2013 (I know…)
- Edit the Custom Action that was created for the above process and copy the Navigate to URL value to your clipboard, cancel out of that action
- Select the Custom Actions area towards the bottom right
- Within the ribbon, select the Custom Actions tab and click the Custom Actions button and pick View Ribbon
- Give the action a name (probably the same as the List Item Drop Down button), give it an image and configure permissions etc. as you need
- Within the Select the type of action area, pick Navigate to URL and paste in the URL copied from the other custom action
- However, you will need to replace {ItemId} with {SelectedItemId} for it to work
- And voila you have buttons that do things!
If you don’t have access to SharePoint Designer 2013 for whatever reason the URL that it uses is in the following format: ~site/_layouts/15/NintexWorkflow/StartWorkflowAuto.aspx?List={ListId}&ID={SelectedItemId}&TemplateID={TemplateId}&Source={Source}&AssociationName={WorkflowName}