CRM 2011 – 5000 record limit on data retrieval via SDK

I learnt something today about data retrieval queries using the SDK.

There is a 5000 item limit on queries using the SDK.  This seems quite an unusual setting to add because you would think developers using the SDK would roughly know what they are doing so what would be the purpose of limiting items returned via queries to the SDK.

I also thought it was unexpected so it could cause quite a bit of frustration trying to work out why some records where being changed by your code.

This setting is in CRM 4 and CRM 2011 but good news is at hand because someone has worked out how to up the limit to anything you want.  1 million records, MWAHAHAHAHAA.  (actually I don’t recommend that it could slow everything down)


if you want to turn the limit off or just see how it’s done then click the link below


7 thoughts on “CRM 2011 – 5000 record limit on data retrieval via SDK

    • auronliners March 14, 2012 / 6:46 am

      I meant: one customer that has more than a million contacts. It’s quiet early in Europe 😉


  1. Hosk March 14, 2012 / 9:19 am

    I only said one million because I was thinking about when Doctor evil says this in Austin Powers. I did also mention, I didn’t recommend it.

    You might want to increase the size to 20000 rows because if you are doing something which checks or updates all your contacts and you have hundreds of thousands you might want to increase from 5000.


  2. Konstantin March 14, 2012 / 8:57 pm

    As usually, here is some but … It works but not for CRM Online 😦 . And it can be real problem when you doing initial integration with CRM Online through Dynamics Connector.



  3. AdrianR March 19, 2012 / 3:11 pm

    The reason for Microsoft creating a setting like this is probably because the dev team knows that people will take example code from the internet or the SDK and expect it to be production ready, despite warnings to the contrary. This is a safety blanket to protect organisations from lazy developers.

    As auronliners indicated you can already obtain more that 5000 records – if you stop, think and read the SDK – plus this hack only works in the On-Premise version.

    Advertising hacks like this is pandering to people that can’t be bothered to learn the proper way to obtain large volumes of records from CRM.


    • Hosk March 19, 2012 / 3:34 pm

      I was just noting down an interesting setting that might catch some people unaware.

      but that’s for the lecture


  4. AdrianR March 20, 2012 / 9:09 am

    @hosk: Indeed, it is useful to be aware that such settings exist as in some cases they can be useful, I’m just making the point that there are idiots out there that think this should be used in a production system when they can’t be bothered to learn about methods of results paging and result set reduction.


Leave a Reply

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

You are commenting using your 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.