3

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 '18 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 '18 at 6:04
  • And what is the task you trying to do using workflow? – Sunil Sahu Dec 5 '18 at 9:18
2

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 for the link but if i want to do a batch?So multiselect on the list view and click a button to trigger – naijacoder May 15 at 7:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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