cancel
Showing results for 
Search instead for 
Did you mean: 

Duplicate and Orphaned Workflow Menu Items

aaron_labiosa
Nintex Newbie
16 1 7,288

Products: Nintex Workflow 2013, Nintex Workflow 2010, Nintex Workflow 2007

 

Summary

Duplicate or orphaned menu items are present when a workflow is started from item dropdown.

menuitem.png

Cause

Duplicate item: The workflow was imported from another environment/site/list multiple times with the menu item enabled.

Orphaned item: The workflow was deleted without first disabling the menu item in Workflow Settings.

 

Resolution

The below PowerShell snippet can be run on a SharePoint (Including SharePoint 2007) Server as a Farm Administrator to list all menu items where ‘WebURL’ is equal to the URL of the site and ‘ListTitle’ is equal to the list:

 

[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

$($($(New-Object -TypeName Microsoft.SharePoint.SPSite('http://WebURL')).OpenWeb()).lists['ListTitle'].UserCustomActions)

 

Once you have run the above script, you can target the menu item by its index and delete it by running the below snippet:

 

$($($(New-Object -TypeName Microsoft.SharePoint.SPSite('http://WebURL')).OpenWeb()).lists['ListTitle'].UserCustomActions[0]).Delete()

 

Note: The above example will delete the first item in the collection of menu items (index 0).

 

Alternatively, SharePoint Designer can be used to perform the same cleanup by navigating to the list and viewing Custom Actions under List Settings:

 

sharepointdesigner.png

1 Comment
jdandersonct
Nintex Newbie

I have 7 different workflows on the item menu. One is a duplicate because I forgot to remove it before deleting the workflow. When I open the list is SharePoint Designer there are no custom actions listed. What am I missing? Thanks.

 

UPDATE: Never mind. Pilot error. I was looking at the wrong list in SPD. Thanks,