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.

Report
All responses (
Answers (