Search code examples
sharepointsharepoint-2007sharepoint-workflow

How can I add parameters to a workflow in sharepoint 2007


I'd like to create a custom workflow for SharePoint 2007 (NOT 2010) in Visual Studio. My need is to have a custom parameter when this workflow is attached to the list. These would be parameters that I can reference in the Workflow, like a SharePoint ID, email, or other kind of string.

Does anyone know how to accomplish this?


Solution

  • Sure. They are called Workflow Association (setting default values for workflow) and Initiation (setting/modifying values when starting workflow for each item) Forms:

    Association and initiation forms are displayed for users to complete before any workflow actually starts. You can use these forms to enable users to set parameters and other information for the workflow in advance.

    You can read Accessing Data from Workflow Association and Initiation Forms in Windows SharePoint Services 3.0 on MSDN

    Somwhere on the way in the article you can encounter the following sentance:

    The code shown below is based on the Feedback Collection workflow sample that is provided with the Windows SharePoint Services 3.0 SDK

    To have these examples at hand, i would suggest you download and install (so you can see how it's done by yourself):