Hello Team,
I am trying to implement the ExecuteMultipleRequest option for bulk process (Create / Update) in plugin C# Code, getting following error in the Unmanaged Environment (DEV), however its working as expected in Debug profile in local execution. Could you please advise this issue.
Error Message :
at Microsoft.Xrm.RemotePlugin.Grpc.SandboxFabricDuplexCommunicationHandler.<ExecuteSDKActionAsync>d__46.MoveNext() +0x250: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #3DE4564E ---> System.Exception: ERROR: InspectionProcessPlugin: CloseInspectionTasks:. ---> System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: System.Runtime.Serialization.SerializationException: Element 'http://schemas.datacontract.org/2004/07/System.Collections.Generic:value' contains data from a type that maps to the name 'http://schemas.microsoft.com/xrm/2011/Contracts:EntityName'. The deserializer has no knowledge of any type that maps to this name. Consider changing the implementation of the ResolveName method on your DataContractResolver to return a non-null value for name 'InspectionTask' and namespace 'http://schemas.microsoft.com/xrm/2011/Contracts'.
Note : Please find the attached detail error Log.
Hi @sabarishbabu ,
I am not aware of a better way, that looping through all records in a plugin or implement a flow.
Thank you Diana!!
Do you make requests to a table called "EntityName"?
>> No, Actually the Table Schema name is Business Related name that's why I just updated to EntityName.
I want to improve the performance, as I mentioned early in the post I want to update 200+ records in a entity, just one Status field from InProgress to Completed. In the plug-in code, is there any way to use like SQL-Query for update instead of looping each record to update . Please advice the same, much appreciate your help.
Hi @sabarishbabu ,
Maybe the name "EntityName" is the issue. I might be wrong, but I expect this name to be reserved.
As in the link described, batch requests like ExecuteMultiple won't improve the performance when executed inside a plugin. The ExecuteMultiple Requests improves performance only when the network latency could be an issue. But inside the PlugIn you are already in the backend. Here the description in the docs: https://docs.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/avoid-batch-requests-plugin?WT.mc_id=BA-MVP-5004107#additional-information
For large number or record processing, maybe you can think of alternatives, like Flows or Workflows? Splitting the PlugIn in more steps, where another async PlugIns are triggered, could be a way too, but usually this is complicated and limited too.
Hope this helps!
Thank You Diana !! -
Do you make requests to a table called "EntityName"?
>> Yes, Actually the Table Schema name is Business Related name that's why I just updated to EntityName.
I have a scenario Like based on some business rules, I have to update 100+ records in a table, currently I am using Service.Update() to loop through updates and this operation take quite some time.
To improve the performance of this process using the ExecuteMultipleRequest, please advice the same.
Hi @sabarishbabu ,
Do you make requests to a table called "EntityName"?
I guess it's not the answer you are looking for, but just in case... I wanted to get sure you know that ExecuteMultiple request is not recomnmended for PlugIns: https://docs.microsoft.com/en-us/power-apps/developer/data-platform/best-practices/business-logic/avoid-batch-requests-plugin?WT.mc_id=BA-MVP-5004107
WarrenBelz
109
Most Valuable Professional
Michael E. Gernaey
82
Super User 2025 Season 1
MS.Ragavendar
72