SharePoint item.Update() using SharePoint API does not invoke workflow, help?

Asked By .NET Reaper
05-Nov-09 12:22 PM
Earn up to 0 extra points for answering this tough question.
Hi,

I have a form library that has a simple two step workflow that assigns tasks based on a status column change. I have the workflow built in SP Designer that is set to trigger on item add and item edit.

It functions normally when I upload, create and edit an item. But the problem occurs when I try to update the item using SharePoint APIs. Code!

I am doing item.Update(). Have already tried item.SystemUpdate() and all other possible workaround to get the item to update. My code is basically updating the form using filestream and I simply run an item update.

My code is run in the elevated previleges block. Any help guys? Appreciate.

  Are you using the SPContext.Current.Site or SPContext.Current.Web ?

Alon Havivi replied to .NET Reaper
06-Dec-09 02:08 AM
Make sure you create a new SPSite object inside the RunWithElevatedPrivileges because SPSite or SPWeb objects created outside do not have full control even when referenced inside the delegate.
Create New Account