[英]I Want To Instatantiate System Workflow Using PlugIn In Online CRM2011
I have a workflow which need to update a custom entity(say-customentity) But it will update which record that need to be pass(ie GUID of that record) using PlugIn. 我有一个需要更新自定义实体的工作流程(说 - 临时)但它会使用PlugIn更新需要传递的记录(即该记录的GUID)。 This PlugIn Fires On Some Event Takes GUID Of That Record And Need To Pass This Guid To System Workflow.I Don't Know How To Pass Parameters To system Workflow.
这个插件触发某些事件需要该记录的GUID并需要将此指南传递给系统工作流程。我不知道如何将参数传递给系统工作流程。
There Is Some Boundation That Is Why i can not directly trigger that workflow on that event on which PlugIn fires..
Any Kind Of Help Will Be Appreciated. 任何形式的帮助都会受到赞赏。
Thanks, Anish 谢谢,阿尼什
I'll be honest, I only slightly understand your question. 说实话,我只是略微理解你的问题。
I believe you are asking: "How can I start a workflow programatically? For example in a plugin?". 我相信你在问:“我如何以编程方式启动工作流程?例如在插件中?”。
In which case you do it like this: 在这种情况下,你这样做:
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest()
{
WorkflowId = workflowId, //Guid of the workflow you want to start
EntityId = recordId //Guid of your record
};
ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)serviceProxy.Execute(request);
The workflow must be set to "Run On Demand". 工作流程必须设置为“按需运行”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.