GuidoPreite/DRB

Issue on systemuser table

Closed this issue · 3 comments

Hello,

I get the following error when I tried to set the entity to "systemuser" in Retrieve Multiple Request. It occurs after a long loading.

Capture d’écran 2021-11-24 154915

Complete message:

"{"Message":"The current batch message contains too many parts. A maximum number of '1000' query operations and change sets are allowed in a batch message.","ExceptionMessage":"The current batch message contains too many parts. A maximum number of '1000' query operations and change sets are allowed in a batch message.","ExceptionType":"Microsoft.OData.ODataException","StackTrace":" at Microsoft.OData.ODataBatchReader.IncreaseBatchSize()\r\n at Microsoft.OData.ODataBatchReader.ReadImplementation()\r\n at Microsoft.OData.ODataBatchReader.InterceptException[T](Func1 action)\\r\\n at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.d__16.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.<>c__DisplayClass9_0.<b__0>d.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.PowerApps.CoreFramework.ActivityLoggerExtensions.d__111.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Xrm.Telemetry.XrmTelemetryExtensions.d__131.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Crm.Extensibility.OData.CrmODataUtilities.d__152.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Microsoft.Crm.Extensibility.OData.CrmODataBatchHandler.d__9.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.OData.Batch.DefaultODataBatchHandler.d__0.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Batch.HttpBatchHandler.d__0.MoveNext()","ErrorCode":"0x0"}"

Thanks for reporting this.
This is why you get the error: When a table is selected for some requests (like the Retrieve Multiple, but probably you see the same error for the Retrieve Single) all the connected tables are retrieved (in order to get the relationships and their columns).
Systemuser is connected to the majority of tables (due to the ownership) and this is the reason you face a long loading. From the error message looks like there are many tables inside the instance and the queries to retrieve all the connected tables are more than 1000, I was not aware of this limit.
During the next days I will work on a fix, both for the long loading and for the specific error you got.
As a workaround you can try to select other common tables (like account, contact, team) before selecting systemuser one, this will probably reduce the number of queries and avoiding the error.

@arth78 I just released a new version (1.0.0.9) that should address the problem you described.
If you can test and let me know your result, after I will close this issue.
Thanks.

@GuidoPreite Tested and well fixed ! :)
Thanks for your responsiveness and for this awesome tool 👍