Thursday, May 29, 2008

Removing workflow instance from List Item

Hi All,

May times we want to terminate the workflow from list Item.

Here is a way you can accomplish this :

Let's say you are working with the workflow and workflow is attached with the list. So change in the list item triggers the workflow, then the following code will remove the workflow instance on that Item.

workflowProperties.Site.WorkflowManager.RemoveWorkflowFromListItem(workflowProperties.Workflow);


That's it. Your job is done.

Thank you

No comments:




Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to sharepointkings@gmail.com with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to sharepointkings@gmail.com