How to run ondemand workflow over all pages

2019-08-02 18:43发布

I have to run an ondemand workflow over my custom entity,

lets say i have 1 million records, so how can i run this work flow over these records.

since, as far as i know we can only select the record and from ribbon click run workflow and specify it. In this way for max in single try, i can only select one page records and hence limited access

any idea?

3条回答
看我几分像从前
3楼-- · 2019-08-02 19:27

You cannot do that with the UI. The simplest approach would be with a small program which selects all records and trigger the workflow execution.

You could use the ExecuteWorkflowRequestfor this task.

// Create an ExecuteWorkflow request.
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
{
    WorkflowId = <insert workflow id here>,
    EntityId = <insert record id here>
};

// Execute the workflow.
var response = (ExecuteWorkflowResponse)_serviceProxy.Execute(request);
查看更多
放我归山
4楼-- · 2019-08-02 19:28

Actually you could run a workflow over all records out of the box, if you do it using the outlook client, via a pinned view. It's described in this blog post: http://www.powerobjects.com/blog/2013/07/30/run-on-demand-workflow-in-dynamics-crm-250-records/

查看更多
登录 后发表回答