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
Why would you tamper with the setting? Even if you set it to 1 million entries, you could run into issues (e.g. large customer with more than a million customers).
To avoid this, you could use the paging cookie (see http://msdn.microsoft.com/en-us/library/gg327917.aspx) and loop over the data.
LikeLike
I meant: one customer that has more than a million contacts. It’s quiet early in Europe 😉
LikeLike
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.
LikeLike
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.
Cheers,
Konstantin
LikeLike
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.
LikeLike
I was just noting down an interesting setting that might catch some people unaware.
but that’s for the lecture
LikeLike
@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.
LikeLike