Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Returns the specified workflow association for a given list item.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
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
item
Type: Microsoft.SharePoint.SPListItemThe list item for which to get the workflow association.
associationId
Type: System.GuidThe 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