Thursday, 15 September 2011

Using a custom task list template for a Workflow task list

In Visual Studio I created a custom content type, a custom task list template and a custom list instance using the template, but couldn't get this list to appear in the task list when trying to add a new Workflow in the SharePoint UI.

The problem turned out to be my use of the wrong value for the 'Type' attribute of the <ListTemplate> element in my list definition. When creating a workflow you are only able to select task lists with Type="107". The Elements.xml file should look some like this:

<ListTemplate
        Name="CustomTasks"
        Type="107"
        BaseType="0"
        OnQuickLaunch="TRUE"
        SecurityBits="11"
        Sequence="360"
        DisplayName="Custom Tasks"
        Description="Custom Tasks"
        Image="/_layouts/images/ittask.png"/>

No comments:

Post a Comment

Comments are moderated, so you'll have to wait a little bit before they appear!