【问题标题】:post operation async plugin is not firing on CRM on Premise后操作异步插件未在 CRM on Premise 上触发
【发布时间】:2018-12-11 18:27:59
【问题描述】:

我已将我的插件注册为以“无”隔离模式运行的后异步插件。它在我处于调试模式时运行,但在我在目标实体“注释”上创建记录时不会从网络运行。

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

代码:

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");
        }

            .....

    }


}

当我在调试模式下运行插件并且没有错误执行时,插件按预期工作。当我将文档附加到我的实体时,插件根本不会执行,也不会记录任何错误。

任何想法如何诊断这个?还是缺少什​​么?

【问题讨论】:

    标签: c# dynamics-crm


    【解决方案1】:
    1. 尝试将其更改为同步插件并验证它是否触发。您可以将InvalidpluginExecutionException 放在第一行本身进行验证
    2. 很好,您正在使用跟踪服务(猜想您已在此处修剪代码?),通过导航到设置 - 插件跟踪日志检查插件跟踪日志是否有任何异常

    【讨论】:

      猜你喜欢
      • 2015-07-13
      • 2023-03-04
      • 1970-01-01
      • 2015-02-11
      • 1970-01-01
      • 1970-01-01
      • 2010-09-09
      • 1970-01-01
      • 2017-02-15
      相关资源
      最近更新 更多