Crm Newshubb
Advertisement
  • Home
  • News
  • CRM Software & Tools
  • Contact us
No Result
View All Result
  • Home
  • News
  • CRM Software & Tools
  • Contact us
No Result
View All Result
Crm Newshubb
No Result
View All Result
Home News

BypassCustomPluginExecution question – Microsoft Dynamics CRM Forum Community Forum

admin by admin
August 4, 2022
in News


Hi,

I have a question regarding the use of the BypassCustomPluginExecution option.

The scenario is the following:

– I have a custom entity called nc_test. This entity has one custom field nc_enddate.

– I have created a post-operation plugin for this entity that does something (for this case it’s not relevant what it does, only that it exists)

– The created plugin triggers on all attributes (no filtering attributes)

– Dynamics 365 On-Premise V9.1.7.5

Test 1 (works as expected)

Now when I perform the following code to update a record of the specified entity, I have verified that the plugin is indeed being bypassed.

var existingRecord = new Entity(“nc_test”, new Guid(“E101261B-623C-E911-8FDF-1860247C2220”));
existingRecord[“nc_enddate”] = new DateTime(2022, 8, 4);

var updateReq = new Microsoft.Xrm.Sdk.Messages.UpdateRequest();
updateReq.Target = existingRecord;
updateReq.Parameters[“BypassCustomPluginExecution”] = true;
crmContext.Execute(updateReq); //crmContext is an IOrganizationService object

Test 2 (plugin is not bypassed)

– I change the plugin to set the filtering attributes to nc_enddate, so it will only trigger when that field has changed.

– Then perform the exact same code as above:

var existingRecord = new Entity(“nc_test”, new Guid(“E101261B-623C-E911-8FDF-1860247C2220”));
existingRecord[“nc_enddate”] = new DateTime(2022, 8, 4);

var updateReq = new Microsoft.Xrm.Sdk.Messages.UpdateRequest();
updateReq.Target = existingRecord;
updateReq.Parameters[“BypassCustomPluginExecution”] = true;
crmContext.Execute(updateReq); //crmContext is an IOrganizationService object

This time however the BypassCustomPluginExecution option does not seem to work.

Does anyone know why this option only seems to work for plugins that have no filtering attributes?

And what would you recommend as a solution for this?

Thanks in advance.

Best regards,

Chris



Source link

Tags: DeveloperDevelopment / Customization / SDKDon't know
Previous Post

Dataverse, pakiety NuGet i zależności między bibliotekami rozszerzeń

Next Post

Forum Post: RE: Display a lookup column in one entity created in another entity

Next Post

Forum Post: RE: Display a lookup column in one entity created in another entity

Recommended

CRM Strategy Meets the Demands of Working Remote

July 28, 2022

Installing Microsoft Dynamics 365 Business Central 2022 Wave 1 On-premise Demo: System Requirements

August 2, 2022

How to Scan Business Cards in Microsoft Dynamics 365 to Create Leads and Contacts

August 3, 2022

Scheduled documents in Power Automate –

July 29, 2022

Don't miss it

CRM Software & Tools

Liz Pham on The Oops Factor

August 12, 2022
News

How to Leverage AI to Increase Customer Retention

August 12, 2022
News

Vtiger CRM Blog » Six Benefits of e-Learning for Organizations

August 12, 2022
News

Power Platform – Dynamics 365: Technical Update Briefing: August 25

August 12, 2022
CRM Software & Tools

6 CRM Field Service Trends

August 11, 2022
CRM Software & Tools

The Role of CRM in an Omni-Channel Strategy

August 11, 2022

crm-white

© 2022 CRM News Hubb All rights reserved.

Use of these names, logos, and brands does not imply endorsement unless specified. By using this site, you agree to the Privacy Policy.

Navigate Site

  • Home
  • News
  • CRM Software & Tools
  • Contact us

Newsletter Sign Up

No Result
View All Result
  • Home
  • News
  • CRM Software & Tools
  • Contact us

© 2022 CRM News Hubb All rights reserved.