Increase the limit of ExportToExcel in Dynamics 365 CE – MaxRecordsForExportToExcel

Hi Everyone,

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.


Happy 365’ing
Gopinath.

One thought on “Increase the limit of ExportToExcel in Dynamics 365 CE – MaxRecordsForExportToExcel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s