project team charter

BrightWork Tip: Call a Workflow with a Custom Action

May 9, 2011 by

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.
    image
  2. Click Lists and Libraries and then click the list that you want to add the workflow to.
    image
  3. Click List Workflow.
    image
  4. Give the Workflow a title and click OK.
    SNAGHTML14b47cc9
  5. Click Action | Set Field in Current Item.
    image
  6. Set the % Complete to 1
    image
  7. Set the Actual Finish Date to Today and the Status to (3) Completed.
  8. Click Publish.
    image

 

Add Custom Action

  1. Return to the SharePoint Designer page for the list and click Custom Action | List Item Menu.
    image
  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.
    SNAGHTML14c37d37Now, users will have the option of marking an item in the list as complete.
    image

 

Image credit

Pin It on Pinterest

Share This