Call a Workflow with a Custom Action

SharePoint Designer 2010 makes it really easy to call a workflow from a custom action. A custom action is a UI option that you can add to the ribbon or to the list time menu. In this post I will show how to add a custom action to the list item menu that calls a workflow that marks an item as complete.
First we have to create the workflow and then we create a custom action and bind it to the workflow. We will be using a pmPoint Project Issues list for this.

Create the Workflow

1. Navigate to your SharePoint 2010 site and click Site Actions | Edit in SharePoint Designer. 



2. Click Lists and Libraries and then click the list that you want to add the workflow to.












3. Click List Workflow.


4. Give the Workflow a title and click OK.


5. Click Action | Set Field in Current Item.





6. Set the % Complete to 1



7. Set the Actual Finish Date to Today and the Status to (3) Completed.
8. Click Publish.



Add Custom Action


1. Return to the SharePoint Designer page for the list and click Custom Action | List Item Menu.


2. Give the Item an appropriate name (NB: this is the text that will appear in the list item menu).3. Select Initiate Workflow and select the workflow you just created.
4. Click OK.






















Now, users will have the option of marking an item in the list as complete.