mardi 27 janvier 2015

How to determine if event receiver runs in Workflow 2013 context



I've got an event receiver handling ItemUpdating; now, I'd like to know if the update was triggered from a SharePoint 2013 workflow (setting the workflow status for example) or directly by a user (edit form, REST API whatever).


Access rights in the workflow context are different, trying to access another list fails with access denied for example, so I need to know if I'm running in a workflow context to determine if access denied error is OK(inside workflow) or is an Error(normal update).


properties.Web.CurrentUser is however the same in both cases;








0 commentaires:

Enregistrer un commentaire