Quantcast
Channel: SharePoint Legacy Versions - Using SharePoint Designer, InfoPath and Other Customizations Forum
Viewing all articles
Browse latest Browse all 2319

SPD Workflow Does Not Start on SPListItem.Update

$
0
0

I've been doing a lot of searching and have found other people that have expressed the same problem, but I can't find any post that submits an actual answer.  I know I've accomplished the exact same on other SharePoint farms in the past, maybe I'm missing something obvious.

I have a new MOSS 2007 farm, so it has SP2 installed.  I created a custom list and added a workflow using SPD to just send an email.  If I go through the browser and click New the workflow runs.  I created a simple web part that does the same thing (code below), the item is created in the list, but the workflow does not start and doesn't throw any error.  The code is not using elevated permissions so it isn't running as the system account (and the app pool is actually running as a service account we created).

SPList list = SPContext.Current.Web.Site.RootWeb.Lists[listName];
SPListItem item = list.Items.Add();
item[listTitleFieldName] = "Message from x";
item[listToFieldName] = txtTo.Text;
item[listFromFieldName] = txtFrom.Text;
item[listMessageFieldName] = txtBody.Text;
item[listSentFromPageFieldName] = GetSentFromPage();
item.Update();

 


Viewing all articles
Browse latest Browse all 2319

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>