Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Using the ExecuteMultipleRequest Message to Perform Bulk Retrievals from Dynamics 365

Post Author: Joe D365 |

In today's blog, we will go through the steps needed to use the ExecuteMultipleRequest message, in order to perform bulk retrievals from CRM. Using the message ExecuteMultipleRequest is particularly useful in situations when you want to perform multiple queries and avoid making multiple calls to Microsoft Dynamics 365. This technique yields superior performance over individual request processing only when the request is sent over the wire to the CRM Web Service (e.g. Integration, Service, WPF or Console application). The usage typically does not perform well when utilized in plugin code.

This code will generally be part of your existing class in your project in a Visual Studio solution or as within a wrapper class written to encapsulate this functionality for reusability across multiple projects.

1. Build the RetrieveMultipleRequest(s).

ExecuteMultipleRequest

2. Add the requests to an OrganizationRequestCollection.

3. Build the ExecuteMultipleRequest.

ExecuteMultipleRequest

4. Perform a service call to CRM with the IOrganizationService.

ExecuteMultipleRequest

5. Parse the results.

ExecuteMultipleRequest

That's all there is to it! Dynamics 365 is smart enough to send back responses in the same order as the requests were made. To get more tips like this one delivered directly to your inbox, make sure you subscribe to our blog!

Happy CRM'ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

PowerObjects Recommends