Microsoft Dataverse 低代码插件提示和已知问题(预览版)

[本主题是预发行文档,可能会有所更改。]

本文介绍在 Microsoft Dataverse 中使用低代码插件时的提示和已知问题。

重要

  • 即时低代码插件已降级,不作为功能交付。 即时低代码插件替换为函数。 详细信息: Microsoft Dataverse 中的函数(预览版)
  • 这是一项预览功能。
  • 预览功能不适合生产使用且功能可能受限。 这些功能在正式发布之前可用,以便客户能够提前访问并提供反馈。

处理常规运行时问题

如果遇到运行时插件问题,请重新编辑低代码插件。 然后,您的公式表达式中的 Intellisense 问题将在低代码插件编辑器中显示。 按照指南更正显示的问题,然后重新保存插件。

使用操作后修补时,应小心谨慎

在操作后中使用 Patch 时,您的低代码插件执行可能会遇到此错误:Execution failed for PowerPlexPlugin: System.ServiceModel.FaultException 1[Microsoft.Xrm.Sdk.OrganizationServiceFault] This low-code plugin's execution was cancelled because the plugin logic caused an infinite loop. Correct the plugin logic and try again.

在操作后场景中使用Patch时必须谨慎,以避免无限循环。 Patch 操作会启动新事务。 例如,如果MyTable的更新触发器调用Patch(MyTable, ThisRecord, ...),此操作可能会导致递归更新周期。

下面是几个可以避免此问题的作示例:

  • Patch(CurrentTable, SomeOtherRecord, ... ) // For example, updating a manager's contact from a contact record.
  • Patch(OtherTable, SomeOtherRecord, ... ) // Operations on a completely different table.

处理两分钟超时

对于持续两分钟或更长时间的操作,可以收到此错误:

Execution failed for PowerPlexPlugin: System.ServiceModel.FaultException1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Operation not allowed as plugin execution exceeded maximum allowed time (Fault Detail is equal to Exception details: limit your callbacks .. Create, Update)

使用 Dataverse 低代码插件时,必须有效地管理两分钟的超时:

  • 在您的插件中限制PatchCollect操作的数量,尤其是当已经有其他插件注册到该表时,这可能会影响您的插件性能。
  • 监控性能。 请留意插件的性能,并考虑在 Dataverse 中使用跟踪和日志记录功能来跟踪执行时间和故障。 通过遵循这些准则,可以确保低代码插件在 Dataverse 环境中顺利运行,而不会因两分钟的超时而中断。 更多信息:跟踪和日志记录

从 APIM 接收的失败响应

如果收到此错误消息,可以从 API 管理(APIM)返回,只需编辑插件,然后重新保存。 保存会初始化 APIM 身份验证,插件开始成功执行。

Execution failed for PowerPlexPlugin: Failed response received from APIM; StatusCode: NotFound; ResponseContent: { "statusCode": 404, "message": "Resource not found" } Method: POST; RequestUri: https://canada-001.azure-apim.net/invoke; StatusCode: NotFound; ResponseContent: { "statusCode": 404, "message": "Resource not found" }; HeadersString: Headers - 'Access-Control-Allow-Methods': 'System.String[]'; 'Access-Control-Allow-Origin': 'System.String[]'; 'Access-Control-Max-Age': 'System.String[]'; 'Access-Control-Expose-Headers': 'System.String[]'; 'Date': 'System.String[]'; Access to APIM expires..edit and save the plugin

另请参阅

在 Dataverse 中使用低代码插件