[Request] Codeunit 13 Gen. Jnl.-Post Batch Event and GuiAllowed
In Codeunit 13 Gen. Jnl.-Post Batch, we requiere a trigger before clearing the data exchange entries:
local procedure OnBeforeClearDataExchEntries(var PassedGenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean)

In order to use this codeunit in background processes, GuiAllowed is needed at the following locations throughout the code to prevent the progress dialog from opening and causing an error. The record counts that are only used in the progress dialog can also be disabled when GuiAllowed is false.
In procedure ProcessLines():
The opening and updating of the progress dialog and the count of the number of records, which is only used in the progress dialog, should be proceeded by GuiAllowed:

In procedure CheckAndCopyBalancingData();
The count of the number of entries is only used in the progress dialog and therefore should also be proceeded by GuiAllowed:

In the following three functions GuiAllowed should be added at the beginning:
- UpdateDialog():
- UpdateDialogUpdateBalLines():
- UpdatePostingState():
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.