How to run ondemand workflow over all pages

假如想象 提交于 2019-12-24 05:54:09

问题


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?


回答1:


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);



回答2:


I use http://mscrmtoolkit.codeplex.com/documentation#workflowexecutionmanager for this purpose. Works fine.




回答3:


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/



来源:https://stackoverflow.com/questions/6907854/how-to-run-ondemand-workflow-over-all-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!