Dynamics 365: Prevent firing plugin execution while updating record

674 views Asked by At

I want to update a field without firing the plugin execution. I tried to update it with SQL 4 CDS from Xrmtoolbox, but the plugin executes and I get a timeout error. This plugin is updating all child records, but at this case we want to bypass this.

Is there a way to achieve this ?

2

There are 2 answers

0
Kostas Karagiannis On BEST ANSWER

I found a way to update record without triggering plugins. At SQL 4 CDS, in Settings menu there is an option "Bypass custom plugins" as you can see at the screenshot below. By checking this option, you can update the record without triggering plugin execution

Bypass custom plugins

0
Henk van Boeijen On

In C# you can actually do this using an UpdateRequest.

You would create the request like this:

var request = new UpdateRequest
{
    Target = entity,
    ["BypassCustomPluginExecution"] = true
};

Important note: users must have the prvBypassCustomPlugins privilege to make this work. This privilege cannot be assigned through the UI and only the System Administrator role has this privilege by default.

See also Bypass Custom Business Logic - MS Learn.