Getting the user id who canceled the workflow RRS feed

  • Question

  • Hi

    How can I find out which user (who) cancelled/Resume (not initiated) the workflow?  Eg. A user from an Admin Team changed some values on an entity and its triggered the workflow and Workflow is in Wait state and some other user from a different team changed some value on the same entity and its resumed or cancelled the workflow. Such a situation how can I get the user id who resumed or cancelled the workflow? I'm always getting the user id who initiated the workflow.



    Monday, September 8, 2014 2:42 PM

All replies

  • I've not checked this, but I would expect that you could get this from the modifiedby attribute of the asyncoperation (system job) entity

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, September 8, 2014 9:23 PM
  • Hi DavidJennaway

    Thanks for your reply. I tried your suggestion but  modified name is always showing as 'SYSTEM'. Actually its showing the correct user name in modifiedby Attribute for a moment then its changing to 'SYSTEM'. any thoughts?


    Tuesday, September 9, 2014 8:38 AM
  • Hi,

    did you try 

    iworkflowcontext.UserId?  OR. iworkflowcontext.InitiatingUserId ?

    Thanks and Regards.

    Tuesday, September 9, 2014 9:31 AM