Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X

How to increase 50 Records Page Limit on OData Retreive Response for MS Dynamics CRM 2011

Working with MS Dynamics CRM OData could be so tiring when you are tyring to pull all the records you have and you can only get 50 records pulled.

I came across this limitation when I was working on the application that needs to retreive records and display on a page, that can then be searched live. $top won't work because the "MaxResultsPerCollection" has been config as 50 in the MSCRM_Config table. Here is how to increase number of records retreived.

Open up your power shell and type the follow:

Add-PSSnapin Microsoft.Crm.PowerShell
$setting = New-Object "Microsoft.Xrm.Sdk.Deployment.ConfigurationEntity"
$setting.LogicalName = "ServerSettings"
$setting.Attributes = New-Object "Microsoft.Xrm.Sdk.Deployment.AttributeCollection"
$attribute = New-Object "System.Collections.Generic.KeyValuePair[String, Object]" ("MaxResultsPerCollection", 75)
$setting.Attributes.Add($attribute)
Set-CrmAdvancedSetting -Entity $setting

Where 75 indicates the number you are increasing the retrieved results to. See below for visual guide.

Hope this is helpful..

 


comments powered by Disqus