SPWorkflowAssociation.SetTaskList Method
Specifies the task list on which to create workflow tasks for this workflow association.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub SetTaskList ( _
list As SPList _
)
'Usage
Dim instance As SPWorkflowAssociation
Dim list As SPList
instance.SetTaskList(list)
public void SetTaskList(
SPList list
)
Parameters
list
Type: Microsoft.SharePoint.SPListThe task list on which to create workflow tasks.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The list parameter is null . |
ArgumentException | The template of the list is not SPListTemplateType.Tasks - or - The task list and the history list of the association are not in the same web. |
Remarks
If the workflow template requires no task list, this method does nothing and returns; otherwise, this method sets the task list on which to create workflow tasks for this workflow association.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation