SPWorkflowManager.RemoveWorkflowFromListItem Method
Removes the specified workflow instance from the list item to which it was attached.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Sub RemoveWorkflowFromListItem ( _
workflow As SPWorkflow _
)
'Usage
Dim instance As SPWorkflowManager
Dim workflow As SPWorkflow
instance.RemoveWorkflowFromListItem(workflow)
public void RemoveWorkflowFromListItem(
SPWorkflow workflow
)
Parameters
workflow
Type: Microsoft.SharePoint.Workflow.SPWorkflowThe workflow instance to remove.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | workflow is null . |
Remarks
Removing a workflow instance deletes it entirely. The workflow instance does not remain as a canceled workflow.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation