Cannot get workflow to trigger event receiver

Change the sequence number of the receiver in Elements.xml to a lower value so that the receiver will run before the workflows?

Another way is to actually update the list item inside the workflow, usually assigning the same value to the field will work and results in no change to the list item.

Please note that workflow status is set asynchronously, meaning if you make the workflow trigger the event receiver and inside event receiver you read the workflow status, the workflow status is not guaranteed to be correct at the time as the update happens asynchronously.

The best way to read the eventual workflow status is to write it to a list item’s field and read from there in the event receiver.

Leave a Reply

Your email address will not be published. Required fields are marked *