BC Friday Tips #35 Item Journal Posting and Warehouse Entries
Item journal posting in AL has two codeunits: Codeunit 22 posts individual lines while Codeunit 23 posts entire batches. When warehouse entries are needed, use Codeunit 23 even for single lines, as Codeunit 22 silently fails to create warehouse entries without throwing an error.
Read it hereOpen in Claudehttps-thatnavguy-com-blog-2025-bc-friday-tips-35-item-journal-posting-and-warehouse-entries--e451824ad4.md

post That NAV Guy
"Posting with Codeunit 22 doesn't create warehouse entries. It won't even throw an error."
Key points
- Codeunit 22 posts one journal line at a time
- Codeunit 23 posts all lines in a batch
- Codeunit 22 does not create warehouse entries and won’t error
- Always use Codeunit 23 when warehouse entries are involved
Quotes
- “Posting with Codeunit 22 doesn’t create warehouse entries. It won’t even throw an error.” (Developers need to know that Codeunit 22 silently fails to create warehouse entries, which can lead to missed data without any error indication.)
- “Always use Codeunit 23 “Item Jnl.-Post Batch” when warehouse entries are involved. Even if you’re only posting one line.” (This is the critical best practice that prevents data integrity issues when posting to warehouses.)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
Context
- Features: Item Journal Posting, Warehouse Entries
Source: That NAV Guy, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.