How to programmatically stop workflows in Dynamics 2011?

I need to stop all running workflows associated with the incident (and those that have a name starting with "Auto _").

However, I cannot find any documentation on how to stop the workflow programmatically, and I cannot find how they are stored in the database.

+4
source share
1 answer

This happens via: http://kelvinshen.blogspot.com/2011/09/cancelling-workflows-via-sdk.html

Entity workflowToCancel = new Entity("asyncoperation"); workflowToCancel.Id = workflowID; workflowToCancel["statecode"] = new OptionSetValue(3); workflowToCancel["statuscode"] = new OptionSetValue(32); myCRMService.Update(workflowToCancel); 
+4
source

Source: https://habr.com/ru/post/1413014/


All Articles