如何找到相应的实体和领域的插件CRM
本文关键字:插件 CRM 实体 何找 | 更新日期: 2023-09-27 18:09:14
我需要知道附加到特定实体及其字段的所有插件?
我已经取回了所有的插件。下面是我获取所有插件的代码。
public void retrievePlugin()
{
QueryExpression q = new QueryExpression("plugintype");
q.ColumnSet = new ColumnSet() { AllColumns = true };
EntityCollection ec = serviceProxy.RetrieveMultiple(q);
}
我相信你需要的不是插件而是它们的步骤。所以你应该获取的实体是sdkmessageprocessingstep,而不是plugintype。要获得为特定实体注册的步骤,您需要获得该实体的ObjectTypeCode,并通过链接的sdkmessagefiter实体的primaryobjecttypecode字段将其用作过滤器。换句话说,要注册插件步骤来处理与帐户相关的消息,您可以使用以下FetchXml:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="sdkmessageprocessingstep">
<attribute name="name" />
<attribute name="description" />
<attribute name="eventhandler" />
<attribute name="impersonatinguserid" />
<attribute name="supporteddeployment" />
<attribute name="statuscode" />
<attribute name="statecode" />
<attribute name="sdkmessagefilterid" />
<attribute name="sdkmessageid" />
<attribute name="filteringattributes" />
<attribute name="configuration" />
<attribute name="asyncautodelete" />
<link-entity name="sdkmessagefilter" from="sdkmessagefilterid" to="sdkmessagefilterid" alias="a1">
<attribute name="secondaryobjecttypecode" />
<attribute name="primaryobjecttypecode" />
<filter type="and">
<condition attribute="primaryobjecttypecode" operator="eq" value="1" />
</filter>
</link-entity>
</entity>
</fetch>