Skip to content

Commit

Permalink
Fixing #831 instead of using #833, sorry. Retrieve everything with al…
Browse files Browse the repository at this point in the history
…l results, not just 5000 records.
  • Loading branch information
rappen committed Dec 4, 2022
1 parent a369798 commit 310a103
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions FetchXmlBuilder/FXBQueries.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Crm.Sdk.Messages;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Query;
using Rappen.XRM.Helpers.Extensions;
using Rappen.XRM.Helpers.Serialization;
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Converters;
Expand All @@ -19,13 +20,13 @@ public partial class FetchXmlBuilder
{
private string attributesChecksum = "";

internal EntityCollection RetrieveMultiple(QueryBase query)
internal EntityCollection RetrieveMultiple(QueryBase query, bool allrecords = true)
{
EntityCollection result = null;
var start = DateTime.Now;
try
{
result = Service.RetrieveMultiple(query);
result = allrecords ? Service.RetrieveMultipleAll(query) : Service.RetrieveMultiple(query);
}
finally
{
Expand Down Expand Up @@ -279,7 +280,7 @@ private void RetrieveMultiple(string fetch)
eventargs.Cancel = true;
break;
}
tmpResult = RetrieveMultiple(query);
tmpResult = RetrieveMultiple(query, false);
if (resultCollection == null)
{
resultCollection = tmpResult;
Expand Down

0 comments on commit 310a103

Please sign in to comment.