Skip to content

Support BypassBusinessLogicExecution to suppress async plugins during DML #783

Description

@HurleySk

Summary

When BypassCustomPlugins = true is set on Sql4CdsConnection, the engine adds BypassCustomPluginExecution = true to each OrganizationRequest (see BaseDmlNode.cs line ~576). This only suppresses synchronous custom plugins.

The newer BypassBusinessLogicExecution optional parameter (with value "CustomSync,CustomAsync") also suppresses asynchronous custom plugins and workflows. For bulk DML operations this matters a lot — without it, every UPDATE/DELETE/INSERT generates async plugin jobs that pile up in the asyncoperation table.

In our case, a 93K-row UPDATE with BypassCustomPlugins = true still generated ~280K async system jobs (3 async plugins per record), growing our asyncoperation table to 1.6M rows and significantly degrading environment performance.

Request

Add support for BypassBusinessLogicExecution on Sql4CdsConnection, either:

  1. New property like BypassBusinessLogicExecution (string: "CustomSync", "CustomAsync", or "CustomSync,CustomAsync") alongside the existing BypassCustomPlugins
  2. Upgrade the existing behavior so that when BypassCustomPlugins = true, the engine sets BypassBusinessLogicExecution = "CustomSync,CustomAsync" instead of (or in addition to) the older BypassCustomPluginExecution

Optionally, also support SuppressCallbackRegistrationExpanderJob to suppress Power Automate cloud flow callbacks during DML.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions