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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Answered

Execute batch operations using the Web API

(0) ShareShare
ReportReport
Posted on by 157

Hello,

I am referring to this Documentation about batch requests. Can we create multiple records that are related to different entities in the same request?

For example: Create the Sales Order and Sale Order Products.

Thank You,

Eman

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at
    RE: Execute batch operations using the Web API

    Hello Eman,

    Check this - docs.microsoft.com/.../create-entity-web-api

  • Verified answer
    Wahaj Rashid Profile Picture
    11,321 on at
    RE: Execute batch operations using the Web API

    Hi,

    Thank yo for your query. If you mean to create Sales order and related products in one go, that will not work. Sales Order header must be created before order products. That means, your batch must have multiple change sets (one for the order header and one for lines).

    In a batch we can have multiple change sets and read operations, your batch structure would look like this:

    • <batch_unique_id>
      • Change Set 1 (Create Sales Order here).
        • Order 1
        • Order 2
        • Order N
      • Read Operation (Get created orders)
      • Change Set 2 (Create Sale Order Products based on the Sales Order IDs retrieved).
        • Order Product 1
        • Order Product 2
        • Order Product N

    Here is a very nice post for your reference:

    Execute Web API Batch Operations Without ExecuteMultiple – Implementing Tae of <T> (taerimhan.com)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 178

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 142 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans