Today I was working with one of the users and they want to export more than 10000 records from Dynamics 365 CE. We all know that is the limitation in the system. Somehow, I remembered that I read saying that we can increase the limit and quick check has shown a way to do.
There is a configuration for this and we can update in a supported way. MaxRecordsForExportToExcel attribute in Organization entity has this information.
We need Organization ID to update this setting, get it from Advanced Settings/Settings –> Customizations –> Developer Resources –> Instance Reference Information.
Here is the code to update the setting using C# and we can update to the max value of 2147483647 but update it as per your requirement as the huge number might put the load on the system while exporting.
Entity entOrganization = new Entity("organization"); // Get Organization ID from Developer Resources. entOrganization.Id = new Guid("OrganizationID"); entOrganization.Attributes["maxrecordsforexporttoexcel"] = 500000; crmService.Update(entOrganization);
Hope this helps.