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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

CRUD operation with Multiple records in ODATA

(2) ShareShare
ReportReport
Posted on by 66
Dear team,
 
Is it possible to perform CRUD operation in entity for multiple records through ODATA?
 
Please give me the thoughts. thanks!
Categories:
I have the same question (0)
  • Verified answer
    Martin Dráb Profile Picture
    238,113 Most Valuable Professional on at
    Yes, OData supports it by allowing you to group multiple operations in a single HTTP request. Here is a link to the relevant part of OData documentation.
  • CU10121822-0 Profile Picture
    66 on at
    Thanks Martin, for the reply...
     
    I searched in google as well. I have found like
     
    In D365FO, OData indeed supports grouping multiple operations into a single HTTP request through a feature called batch requests. 
    Batch requests allow us to combine multiple queries and CUD (create, update, delete) operations into one request to the D365FO OData endpoint. This is achieved by sending a single POST request to the main OData endpoint (/data/$batch) with a specific multipart/mixed payload that delineates the individual operations .
    for example -
    POST .../data/$batch HTTP/1.1
    Content-Type: multipart/mixed; boundary=batch_boundary
     
    --batch_boundary
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    POST .../data/Customers V1 HTTP/1.1
    Content-Type: application/json
    Accept: application/json
    Prefer: return=representation
    { "CustomerAccount": "CUST001", "Name": "New Customer" }
     
    --batch_boundary
    Content-Type: application/http
    Content-Transfer-Encoding: binary
    POST .../data/SalesOrderHeaders V1 HTTP/1.1
    Content-Type: application/json
    Accept: application/json
    Prefer: return=representation
    { "CustomerAccount": "CUST001", "dataAreaId": "usmf", "DeliveryDate": "2026-01-01" }
     
    --batch_boundary--
     
    Is it something I need to write code for multiple records operation in ODATA?   Am I correct?
     
  • Martin Dráb Profile Picture
    238,113 Most Valuable Professional on at
    You need to make the HTTP request. You don't have to do it from code - for example, you can write it in Postman.
     
    But if you want to do it in code, they you obviously need to create the code doing so. You can create the raw HTTP request on your own, but you can utilize various OData libraries.
  • CU10121822-0 Profile Picture
    66 on at
    Okay Martin, could you please give me an example with Postman with multiple records in https call . Sorry, not understand how to start with. 
    Kindly give me an example , will follow it.
     
    thanks!
  • Verified answer
    Martin Dráb Profile Picture
    238,113 Most Valuable Professional on at
    You've posted an example above.
     
  • CU10121822-0 Profile Picture
    66 on at
    Thanks Martin,

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

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

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 679 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 421 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 282 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans