POWEROBJECTS

718 Washington Ave. N. Suite #101
Minneapolis, MN 55401
View map and all Locations

Send us a message

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.

ExecuteMultipleRequest

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!

Avatar for Joe D365

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.