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

Announcements

News and Announcements icon
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

    Hello Eman,

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

  • Verified answer
    Wahaj Rashid Profile Picture
    11,323 on at

    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

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 71 Most Valuable Professional

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 66 Super User 2026 Season 1

#3
ManoVerse Profile Picture

ManoVerse 46 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans