web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

create multiple Entitys in a single request from a plugin

(0) ShareShare
ReportReport
Posted on by

I have a general question around efficiency and best practice. 

I have read on the Microsoft forum that I should avoid using ExecuteMultipleRequest in my plugins at all costs however it seems to me that its far less efficient to make say 10 calls when 1 call would do, so far my plugin has been working fine without issue however now I'm attempting another creation I'm hitting issues.

For example i have a plugin that updates the opportunity record with opportunityproduct(s), in this example I'm updating with 10 products,

i use ExecuteMultipleRequest to create the product entities in one transaction,
i use ExecuteMultipleRequest to set the state / status of the product entities (SetStateRequest) in one transaction,
i use ExecuteMultipleRequest to create productpricelevel entities 

- so far this process has taken between 3,000 - 3,531 ms 

I then use ExecuteMultipleRequest to create the Opportunityproduct entities in one transaction (there are only 10 records to create)

- plugin execution time drastically jumps to 120,036 causing time out error.


I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    Can you please provide a source where you read about the usage of ExecuteMultiple from plugins?

    It makes no sense because:

    1. Plugin is executed in transaction itself.

    2. Plugin's code is executed near-door to the Api of Dynamics, so there are no losses with travel time.

    My recommendation - don't use ExecuteMultiple from plugins. It makes sense to use it from other apps but not from plugins.

  • RyanCRM Profile Picture
    on at

    This is where i read that ExecuteMultiple should not be used from within a plugin - docs.microsoft.com/.../avoid-batch-requests-plugin

  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Let me re-read that for you.

    1. You read that ExecuteMultiple shouldn't be used from within a plugin.

    2. You develop a plugin and use ExecuteMultiple, your plugin hit the timeout error.

    3. You create a post here describing your issue.

    Doesn't it look for you contradictory?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 163 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 158

#3
Zhilan Profile Picture

Zhilan 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans