Using the ExecuteMultipleRequest Message to Perform Bulk Retrievals from Dynamics 365

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.

Example

1. Build the RetrieveMultipleRequest(s).

No alt text provided for this image

2. Add the requests to an OrganizationRequestCollection.

3. Build the ExecuteMultipleRequest.

No alt text provided for this image

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

No alt text provided for this image

5. Parse the results.

No alt text provided for this image

Dynamics 365 send back responses in the same order as the requests were made


Ahmed Mohammed

Technical Consultant Lead | Dynamics 365 CE/CRM | Power Platform | Digital Transformation

3 年

Thanks for sharing this information. I just want to add note about message usage, it is recommended only to use where code is being executed outside of the crm execution pipelines ( plugins & custom workflow ), like integration or migration scenarios.

要查看或添加评论,请登录

Abd-Elmonem Elsherbeny的更多文章

社区洞察

其他会员也浏览了