15.2. Introduction to Custom Actions

The built-in actions in SharePoint are a good starting point for functionality to your workflows, but if you need functionality that these actions do not provide, you have to create a custom action. Once you have deployed a custom action to SharePoint and configured it to run, it appears in the SharePoint Workflow Designer. This section provides an example in which you build a custom action to create child sites that can be called as a part of a SharePoint Designer workflow.

15.2.1. Creating a Custom Action

Begin the process of creating a custom action by opening Visual Studio and selecting File New Project. The result is the New Project dialog, as shown in Figures 15-1 (Visual Basic) and 15-2 (C#). Ensure that .NET Framework 3.0 has been chosen from the dropdown list in the upper-right corner of the dialog. Do not choose .NET Framework 3.5 unless your SharePoint farm has been configured to support .NET Framework 3.5.

In the Project Types list on the left, expand either the Visual Basic or Visual C# node, depending on the language you want to use, and then click on Workflow in that node. (This example uses Visual Basic.)

Figure 15-1. Figure 15-1
Figure 15-2. Figure 15-2

A list of Project templates will be displayed on the right. Choose ...

Get Professional Microsoft® SharePoint® Designer 2007 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.