繁体   English   中英

后操作异步插件未在前提条件上的CRM上触发

[英]post operation async plugin is not firing on CRM on Premise

我已将我的插件注册为在“无”隔离模式下运行的异步发布插件。 它在调试模式下运行,但在目标实体“注释”上创建记录时不在Web上运行。

我想补充一下,该程序集已注册存储在数据库中。

码:

public void Execute(IServiceProvider serviceProvider)
{
    try
    {
        if (context.InputParameters.Contains("Target") && context.InputParameters["Target"] is Entity)
        {
            // Obtain the target entity from the input parameters.
            Entity entity = (Entity)context.InputParameters["Target"];

            // Verify that the target entity represents an annotation. If not, this plug-in was not registered correctly.
            if (entity.LogicalName != "annotation")
                return;

            tracingService.Trace("A Plugin is triggered!", "My Plugin");
        }

            .....

    }


}

当我在调试模式下运行该插件并且执行无误时,该插件可以正常工作。 当我将文档附加到我的实体时,插件根本不会执行,也不会记录任何错误。

任何想法如何诊断? 或缺少什么?

  1. 尝试更改它以同步插件并验证它是否完全触发。 您可以在第一行本身中抛出InvalidpluginExecutionException来验证
  2. 如果您正在使用跟踪服务(猜您是否在这里修剪过代码?),请浏览至设置-插件跟踪日志,检查插件跟踪日志中是否有任何异常。

暂无
暂无

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

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