I am currently facing a rather annoying problem: Everytime a project is completed in our ERP system, a corresponding item in a SharePoint list is created. This part basically works (but there is more, of course).
However, there is also a workflow associated with that list that is supposed to be triggered whenever an item is created in that list (it basically just sends an email to whoever was in charge of the project, but that is beside the point). And now I am told that this workflow has not been triggered in some time. I can reproduce the problem; also, when I add an item to that list manually, the workflow is triggered and runs as expected.
Apparently, this problem occurs under certain (vaguely specified) circumstances, because the program that creates the list items talks to SharePoint using the System / farm manager account. So here is my first question: We are currently running SharePoint 2013 (on-premises) and the admin tells me we are actually in the process of migrating to SharePoint 2016, and from there to 2019. Will this affect my problem?
As part of this whole process, I already query the Sharepoint user account of the project lead, and I would like to just add the item under that user account. But so far I have not been able to find out how to do that, or if it is even possible. So is this an approach worth pursuing?
There are some other things we could try, such as sending the email directly from the program that transfers the projects from the ERP system to the SharePoint list, or creating a dedicated SharePoint user for this purpose.
However, I have the requirement to leave the workflow alone as much as possible, i.e. SharePoint should continue to send the emails. Also, I have been told that changes like adding users are not an option until the migration to SharePoint 2019 is complete.
Is there any hope I can solve this problem without waiting for the migration to SharePoint 2019 (I have a feeling that one is going to take a while)?
(Just in case it matters, the program that creates the SharePoint list items is written in C# and uses the Microsoft.SharePoint.Client Nuget package v14.0.4762.1000 - any attempts to use the SharePoint.Client package (v15.0.0) have resulted in confusion and anger because of some missing unresolvable dependency.)
Thank you very much for any input!