Hi everyone,
We've identified an issue with Report 795 – Adjust Cost - Item Entries in Business Central that seems to introduce unnecessary validation during inventory cost adjust.
Although the report is intended to post value entries only, it internally creates product journal lines, which then trigger production block checks on items. This causes errors when items are blocked for production—even though the process itself doesn't involve actual production activity.
Here are a few workaround ideas we've explored:
Temporarily removing the production block from items before running the report (likely the most common workaround).
Customizing the logic via event subscription to bypass the production block check when the process is triggered by a revaluation.
Regarding option 2, here’s the AL call stack where the error occurs:
Unfortunately, the functions CheckItemAndVariantForProdBlocked and PrepareItem don’t expose events, nor does the table extension. However, the OnBeforeRunWithCheck event in RunWithCheck includes a CalledFromAdjustment flag. When this is true, we could set IsHandled := true and implement a custom PrepareItem function that skips the production block validation.
Of course, this introduces a deviation from standard behavior and could be affected by future updates from Microsoft.
Has anyone else encountered this? Would love to hear your thoughts or if you've successfully requested additional events from Microsoft to handle this more cleanly.
Thanks!
