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

How to reserve inventory for a Movement journal line via X++ (Reserve lot button) logic

(0) ShareShare
ReportReport
Posted on by 263

I'm creating Inventory Movement journal lines (InventJournalTrans) through a custom X++ service — no user interface involved, just code.

For each line, I want to also reserve that quantity, the same way the standard "Reserve lot" button works when you open a journal line and go to Inventory → Reservation in the UI.

My Q is :
Is there a supported way to reserve a quantity/lot for a journal line purely in X++, without needing an actual form/UI session? Or is manual reservation through the form the only way to do this?

Any guidance — a class/method to use, or confirmation this just isn't possible headlessly — would help a lot.

The problem: that reservation logic (WHSInventOnHandReserve) seems to require a live form to work — I keep hitting null-reference errors on form-only objects (inventDimFormSetup) when I try to call it from code without a form.

 

Categories:
I have the same question (0)

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 Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288 Super User 2026 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 276 Most Valuable Professional

#3
Anton Venter Profile Picture

Anton Venter 225 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans