This is an article that was submitted by Gene Vangampelaere for
the European SharePoint Conference - Top SharePoint Competition.
Gene is a SharePoint architect/ developer in ana educational
institute. He works mainly on no-code-solutions.
I always encourage the power users to build their own
applications by using the out-of-the-box tools. The more advanced
applications need the assistant of SharePoint Designer to create
workflows. In some cases the OOTB workflow actions are to
It is possible to create you own SPD workflow actions and let
your (power) users use them. To create a custom action you need
Visual Studio and some coding experience.
Creating the custom action
Create a new "Workflow activity Library" project in VS.
In my example the activity queries a database to get the name of
the course of a student. I named my activity "StudentEmail" (I'll
use the email of the student as key to get the information).
Add a reference to the Microsoft.SharePoint and
A custom SPD workflow action can contain some parameters. In my
case I need the emailaddress of the user and the output parameter
will give me the name of the course. Those parameters are visible
in SPD when you select the workflow:
I'll show you later how you can edit this sentence.
You have to register each property you want to use
in you workflow in this way:
Public Shared EmailProperty As DependencyProperty =
Public Property Email() As String
Set(ByVal value As String)
The actual code of your workflow you can put in the Execute
Protected Overrides Function Execute(ByVal executionContext As
'do your stuff here
Catch ex As Exception : Me.Opleiding = ex.Message
To enable this in SPD you need to do a few more things:
Create a .ACTIONS file
The custom actions are described in a .ACTIONS file. You can
find those files in the 12hive folder on your SharePoint
X:\Program Files\Common Files\Microsoft Shared\web server
The .ACTIONS file contains something like this:
<?xml version="1.0" encoding="utf-8"?>
<Actions Sequential="daarna" Parallel="en">
<ActionFONT-FAMILY: 'Courier New'">Get the course of a given
Category="Howest custom Actions">
<RuleDesigner Sentence="Get the course for
studentemail: %1 (save it in %2)">
<FieldBind Field="Course" DesignerType="ParameterNames"
<Parameter Direction="In" />
<Parameter Direction="Out" />
The action name attribute describes the sentence you see in the
actions selection window. The RuleDesigner Sentence attribute is
the sentence you see when you select your action. The parameters
are set as %1 and %2
(and so on). More information about the .Actions file you can
Be sure you sign your assembly and add the PublicKeyToken and
the assemblyname in this file. When the action is not shown in
SharePoint Designer it is often the case that the assembly
signature is incorrect.
The next step is to modify the web.config (on each front end
server). You have to add a new AuthorizedType.
Again, be sure you add the right assembly signature. And do not
forget to add the assembly in the GAC (c:\windows\assembly) on you
At the end you should get a custom workflow action!
To vote for this article in the Top SharePoint Competition click