简体   繁体   English

在线Dynamics CRM 2011,自定义工作流程

[英]Dynamics CRM 2011 online, custom workflow

I am very new to Dynamics and am wanting something which when a lead is created my workflow will create a contact. 我是Dynamics的新手,我想要一些在创建潜在客户时我的工作流可以创建联系人的东西。 However I do not want duplicate contacts to be created. 但是,我不希望创建重复的联系人。 I read that duplication detection does not work in workflows and that I need to write a plugin. 我读到重复检测在工作流中不起作用,我需要编写一个插件。 I am following this tutorial . 我正在关注本教程 I have created a EmailExists entity and referenced the Lead entity. 我创建了一个EmailExists实体,并引用了Lead实体。 What I need to do is get that Lead entity and then check whether or not a contact exists with that leads email address. 我需要做的是获取该潜在客户实体,然后检查该潜在客户电子邮件地址是否存在联系人。 I'm pretty much stuck on how to get the lead from my custom entity and then query the contactbase. 我对如何从自定义实体中获取潜在客户然后查询contactbase几乎一无所知。 Any suggestions or further reading would be greatly appreciated. 任何建议或进一步阅读将不胜感激。

Thanks in advance 提前致谢

The link you reference is a workaround for the problem of not being able to register custom workflow activities in CRM Online. 您引用的链接是一种解决方法,用于解决无法在CRM Online中注册自定义工作流活动的问题。 If you are using the On Premise version, you should be able to write custom workflow activities. 如果使用的是本地版本,则应该能够编写自定义工作流程活动。

If you are already going to write a plugin, you don't need to follow the instructions in that link. 如果您已经要编写插件,则无需按照该链接中的说明进行操作。 You might as well just write a plugin that fires on Pre-Create of the Lead entity. 您最好编写一个可以在Lead实体的Pre-Create上触发的插件。 It would go query Contacts for that email address, and if it finds one, it would throw an InvalidPluginExecutionException which will cancel the Create. 它将查询该电子邮件地址的“联系人”,如果找到该电子邮件地址,它将引发InvalidPluginExecutionException,这将取消“创建”。 No need for the "EmailExists" entity. 不需要“ EmailExists”实体。

Here's a step-by-step guide on creating a simple plugin: 这是有关创建简单插件的分步指南:

http://msdn.microsoft.com/en-us/library/gg695782.aspx http://msdn.microsoft.com/en-us/library/gg695782.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM