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 comment