Is it possible to run single workflow instance for multiple items? I have spd 2010 workflow i have created and I would like to trigger the workflow via a button on a sharepoint page.

The trigger should cause the workflow to update each items not just one

I have read that my my options could be to use rest api/spservices

Will SPServices work with sharepoint online?

Any resources would be appreciated

  • What do you mean by multiple items? Do you mean items in different or in the same list? – Sunil Sahu Dec 5 at 5:32
  • Thanks Sunil i mean items in the same list. The workflow already in place and it run when item is updated. I would like to do a manual trigger where a user a click a button on a sharepoint page and triggers all the items in this list . Does this make sense? – naijacoder Dec 5 at 6:04
  • And what is the task you trying to do using workflow? – Sunil Sahu Dec 5 at 9:18
up vote 2 down vote accepted

There is rest api /_api/SP.WorkflowServices.WorkflowInstanceService.Current/StartWorkflowOnListItemBySubscriptionId(subscriptionId='subscriptionId',itemId='item id') to start workflow for single item, so you could iterate the items and start one by one.

You could check this thread for sample code.

  • Thanks Lee will give ita crack – naijacoder Dec 6 at 4:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.