代码之家  ›  专栏  ›  技术社区  ›  Bhav

动态CRM-确定是否已从PreContactCreate插件中的Lead生成Contact

  •  2
  • Bhav  · 技术社区  · 9 年前

    我有一个对Contact实体触发的PreContactCreate插件。当点击Lead上的“Quantify”按钮时,这也会被触发。在ExecutePreContactCreate()的插件中,我如何确定Lead是否量化,而不是直接在CRM的Contact部分创建新Contact?

    例如,Contacts中没有ContactA。我单击LeadA上的“Qualify”按钮(对于ContactA)。PreContactCreate插件触发,在此过程中,我想确定此联系人是否是通过限定潜在客户而生成的。

    1 回复  |  直到 9 年前
        1
  •  4
  •   Andrew Butenko    9 年前

    有两种方法,但对我来说,最简单的方法是从联系人处检查originingleadid,如下所示:

    var target = context.InputParameters["Target"] as Entity;
    if (target.Contains("originatingleadid")
    {
    //your logic when contact is created during qualification
    }
    else
    {
    //other sources of creation of contact
    }