Quantcast
Channel: Forum CRM Development
Viewing all articles
Browse latest Browse all 1000

CRM 2013 - Convert Async workflow to Synchronous

$
0
0

Hi,

I already have a async workflow in place in CRM but I would like to convert the workflow to synchronous workflow and set ‘Execute’ as “The user who made changes to the record” in the synchronous workflow programmatically. I am able to find the required workflow and deactivate it. How do I set the workflow's mode property to WorkflowMode.Realtime?

//Deactivate the workflow
                    var deactivateRequest = new SetStateRequest
                    {
                    EntityMoniker = new EntityReference (Workflow.EntityLogicalName, ent.Id),
                    State = new OptionSetValue((int)WorkflowState.Draft),
                    Status = new OptionSetValue(1)
                    };
                    orgService.Execute(deactivateRequest);

                    //Convert workflow to Synchronous workflow
                    UpdateRequest updateWorkflowType = new UpdateRequest()
                    {
                        //How to set Mode property to WorkflowMode.Realtime?
                    };
                    orgService.Execute(updateWorkflowType);

Thanks,

Anna'




Viewing all articles
Browse latest Browse all 1000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>