HOw tO Start YoUr WorKFlow Manually ?(sptechytalks.blogspot.com)

submitted by Freddy_KhalafFreddy_Khalaf(35) 2 years, 11 months ago

to start a workflow on an SpListItem you will need to write the following code ; SPListItem currentItem = //Your Item To start the workflow on it; currentItem.Web.AllowUnsafeUpdates = true; SPWorkflowManager wfManager = currentItem.Web.Site.WorkflowManager; SPWorkflowAssociationCollection wfAssociation= currentItem.ParentList.WorkflowAssociations; foreach (SPWorkflowAssociation Association in wfAssociation) { if (Association.Name == "WorkflowName") { wfManager.StartWorkflow(currentItem, Association,Association.AssociationData); break; } } Try it , but notice that you cant start a workflow from another workflow , you must postback to start the workflow , you can make a form with a button to start the workflow ...

add a comment |category: |Views: 1

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

No comments so far

information Login or create an account to comment on this story