I have SharePoint designer workflow which triggers when the item is getting created in the list which works smoothly but doesnt fire when I upload items in bulk or create more than 2 items using script. What can be done so that workflow fires on all the items created?
2 Answers
Workflow will not trigger:
- If you are using system account to run the script
- If you are using
SystemUpdate()
to update the item in script
Otherwise workflow should trigger on item updation.
-
Thanks for the answer mate. really appreciate it. as you have mentioned in the first point, workflow will not trigger if the script runs with system account, does that mean if we create items in bulk with any other credentials than system account would trigger the workflow? and why is that? Commented Sep 23, 2019 at 5:36
-
Hi Tushar, workflow should trigger for bulk items created/updated using other account.– P SCommented Sep 23, 2019 at 11:08
This is by design. SharePoint security engine didn't allow the workflow start automatically when you logged in site as a system account.
"The user who created or changed the item was logged in with the user name System Account. The user name System Account cannot start workflows that are set to run automatically when an item is created or changed"
As a workaround, you can start the workflow manually if your account is system account.
More references:
http://praveenbattula.blogspot.sg/2010/02/declarative-workflows-cannot.html
http://samirvaidya.blogspot.sg/2014/02/sharepoint-2013-workflows-and-system.html
Resolution Sign in as a user other than System Account, and add the item directly to the list or update an item to start the workflow
-
+1, Thank you very much Lisa, that was really helpful and descriptive. Commented Sep 25, 2019 at 7:38
-
If a reply helps you, please remember to mark it as an answer. Thanks for your understanding. Commented Sep 26, 2019 at 9:52