Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am adding a document into a doc lib using custom code. I am doing this using the current logged in user account permission. after this i am editing the permission of the same document using system account as per req.

Now i have a SD wf that should send an email on item creation. This is not happening.

I know that it is a sharepoint bug that a SD wflow does not fire on item adding by system account. But i am editing the item using system account. But still my wf is not firing.

When i comment the code to edit the item permission, the workflow fires.

Can someone please throw light on this.

share|improve this question

1 Answer 1

There are many variables here related to each of your component. You would need to test your Workflow without your code (do you have an Event Handler? Which event receiver are you using Item Added? - did you used AllowUnsafeUpdates on your web, do you use Synchronous to make sure these events are not running asynchronously in another thread ) - i would strongly suggest you read Karine Bosch article around the theory http://karinebosch.wordpress.com/walkthroughs/event-receivers-theory

On MSDN there is a sample doing exactly the same scenario you mentioned, find it here http://msdn.microsoft.com/en-us/library/ff713708(v=office.12).aspx#WSS2007_ItemEvent

share|improve this answer
    
thanks marius, the link were helpful –  AJ Mania Jul 11 '12 at 8:15
    
glad it helped! –  C. Marius - MVP Jul 12 '12 at 12:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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