Dynamics 365 Batch Processing Limits

So I’ve been working a lot with Dynamics365 recently (aka Microsoft CRM). One of the tasks I was given was to create an overnight batch process to clear down obsolete contacts data. For some reason though Microsoft have imposed an arbitary limit of 1000 records for all batch processing (or “Execute Multiple Request” processing as it  is referred to in Dynamics). The limit is presumably in place to prevent the functionality from being misused by hackers. No good for me though as I had circa 80,000 records to process! So how to get round the limit? After a bit of googling I found this blog post from 2015 which recommended performing an UpdateAdvancedSettingsRequest. However this seemed like rather a lot of work so I decided instead just to divide my updates into chunks of 1000 records. Dynamics however was having none of it and still returned the same “ExecuteMultiple Request batch size exceeds the maximum batch size allowed!” exception. So how to get round this annoying exception?

Simple really – just re-instantiate the CRMServiceClient object after each tranche of 1000 records. Just one line of code…

executeMultipleRequest = GetExecuteMultipleRequest();


Leave a Reply

Please log in using one of these methods to post your comment:

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