Advertisements
Home > CRM > SQL Server Error While Exporting Advanced Find Records To Excel

SQL Server Error While Exporting Advanced Find Records To Excel

Few Users reported that they were getting “SQL Server Error” while trying to export the Advanced Find  records to Excel.

SQL Server Error while exporting records

SQL Server Error while exporting records

Reason :

  • The filter they used in Advanced Find resulted more than 10000 records.
  • CRM has OOB limit of 10000 records to export.
  • If your CRM instance is on premise, you can check the limit by querying OrganizationName_MSCRM database.
  • Below is the query
    • SELECT MaxRecordsForExportToExcel FROM OrganizationBase

Fix :

  • You can increase the value of “MaxRecordsForExportToExcel”.

Supported Way

  • Updating the MaxRecordsForExportToExcel using CRM SDK call is Supported.
  • This will work for both on premise and online instances

Organization organization = new Organization();

organization.Id = {Oragnization GUId}; // Get Org GUID from MSCRM_Config DB’s Organization table.

organization.MaxRecordsForExportToExcel = 300000; // Set desired value

service.Update(organization);

Unsupported Way

  • As you aware its strictly not recommended to update CRM database directly and also this approach only works for on premise.
  • Run below query by connecting to your OrganizationName_MSCRM Database.

UPDATE OrganizationBase

SET

MaxRecordsForExportToExcel = 100000

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: