SPWorkflowAssociationCollection.GetAssociationForListItemById method

Returns the specified workflow association for a given list item.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Shared Function GetAssociationForListItemById ( _
    item As SPListItem, _
    associationId As Guid _
) As SPWorkflowAssociation
'Usage
Dim item As SPListItem
Dim associationId As Guid
Dim returnValue As SPWorkflowAssociation

returnValue = SPWorkflowAssociationCollection.GetAssociationForListItemById(item, _
    associationId)
public static SPWorkflowAssociation GetAssociationForListItemById(
    SPListItem item,
    Guid associationId
)

Parameters

  • associationId
    Type: System.Guid

    The ID of the workflow association.

Return value

Type: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
A SPWorkflowAssociation object that represents the specified workflow association.

Exceptions

Exception Condition
ArgumentNullException

item is null .

Remarks

This method returns the workflow association with the ID specified by the associationId parameter for the list item specified by the item parameter.

See also

Reference

SPWorkflowAssociationCollection class

SPWorkflowAssociationCollection members

Microsoft.SharePoint.Workflow namespace