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 :
Small and medium business | Business Central, N...
Answered

$Batch Requests Logic

(5) ShareShare
ReportReport
Posted on by 192
Hi,
 
With $batch requests what is the logic for failures? From my testing, a batch request fails entirely upon encountering the first error. For example, if you have a batch request with 3 requests. Request 1 succeeds, request 2 fails then request 3 will not get processed.
 
From reading the MS documentation, it makes no mention of the first failure killing the entire batch only that in requests where Isolation: Snapshot header is present, it will rollback all successes upon the first error.
 
Is this standard behaviour or is there another header / field etc that can be added in order to 'bypass' this logic?
 
Thanks!
I have the same question (0)
  • Suggested answer
    Andrés Arias Profile Picture
    5,192 Super User 2026 Season 1 on at
    Hello,

    I am not quite clear, in which process are you referring to? or which is the option to execute?
     
    I hope I can help.
     
    Regards,
     
    Andres
  • Verified answer
    Jacob Profile Picture
    192 on at
    @Andrés Arias thanks for the reply. 
     
    The problem was that the entire batch request would fail on the first request which returned an error rather than proceeding to the next request. If you had 5 requests within a batch:
    -  Req 1 = OK
    -  Req 2 = OK
    -  Req 3 = ERROR
     
    then req 4 and 5 are dropped. 
     
     
    Adding the Prefer: odata.continue-on-error header solves this issue and gracefully handles the individual error of all requests within the $batch. 
     
    Hope this helps anyone else encountering this issue.
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,177 Super User 2026 Season 1 on at

    By default, in Business Central $batch requests, if one operation fails, the entire batch stops processing — remaining requests are skipped.

    To handle this gracefully and allow all requests to run even if some fail, add the header:

    Prefer: odata.continue-on-error

     


    This allows each request in the batch to be processed independently, and only the failed ones will return error responses.

    ✅ Mark this answer as verified if it helps you.

     

  • Gerardo Rentería García Profile Picture
    27,054 Most Valuable Professional on at

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,466 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,829 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,505

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans