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 :
Finance | Project Operations, Human Resources, ...
Unanswered

How to perform batch reservation in X++ through a batch job?

(3) ShareShare
ReportReport
Posted on by 108

I am trying to perform inventory batch reservation through X++ code by running it from a batch job in Dynamics 365 Finance & Operations.

The requirement is to reserve inventory (including batch-controlled items) automatically when the batch job runs, similar to what happens during manual reservation from the sales order.

I have tried using standard reservation classes (for example InventUpd_Reservation, InventMovement) but the reservation is not happening when executed in batch, although it works interactively.

Categories:
I have the same question (0)
  • CU19011222-0 Profile Picture
    on at
    To resolve this, ensure your code explicitly calls InventUpd_Reservation::updateNow() and wraps the logic in a UserContext switch or ensures the Session has the correct InventSite permissions, as batch jobs often lack the default site context required for reservation. You should also verify that the InventDim record used includes the specific Batch ID if you are targeting specific batches, rather than relying on the "Automatic" reservation hierarchy e-zpassky
  • André Arnaud de Calavon Profile Picture
    303,269 Super User 2026 Season 1 on at
    Hi,

    Can you share the coding you used? Can you see if the batch did actually run and did not return error details?
  • David Ali Profile Picture
    on at

    Questions:

    Is the item WMS-enabled (advanced warehousing) and are you reserving in a WMS-enabled warehouse?

     

    Do you need to reserve a specific batch (provided by your logic), or “any batch that fits” like the UI does?

     

    Are you reserving physical on-hand only, or can it reserve ordered supply too?

  • Sagar121 Profile Picture
    1,151 Super User 2026 Season 1 on at
    Hi,
     
    Please share the code. Also tell are you using SysOperation or RunBase?

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 545 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 408

#3
Adis Profile Picture

Adis 267 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans