Post directly thru codeunit 22 "Item Jnl.-Post Line". But be careful you don't require any functionality handled by the related precalled codeunits. Such as related warehouse journal handling
The piece of code seems to be located in CU231 Text001.
I dont know how you can skip it in business central without changing base app code, there is no hidedialog for this function in my nav version at least.
This is how it looks like in BC18 (OnBeforeCode is available with HideDialog):
codeunit 241 "Item Jnl.-Post"
{
TableNo = "Item Journal Line";
trigger OnRun()
begin
ItemJnlLine.Copy(Rec);
Code;
Copy(ItemJnlLine);
end;
var
Text000: Label 'cannot be filtered when posting recurring journals';
Text001: Label 'Do you want to post the journal lines?';
Text002: Label 'There is nothing to post.';
Text003: Label 'The journal lines were successfully posted.';
Text004: Label 'The journal lines were successfully posted. ';
Text005: Label 'You are now in the %1 journal.';
ItemJnlTemplate: Record "Item Journal Template";
ItemJnlLine: Record "Item Journal Line";
TempJnlBatchName: Code[10];
local procedure "Code"()
var
ItemJnlPostBatch: Codeunit "Item Jnl.-Post Batch";
HideDialog: Boolean;
SuppressCommit: Boolean;
IsHandled: Boolean;
begin
HideDialog := false;
SuppressCommit := false;
IsHandled := false;
OnBeforeCode(ItemJnlLine, HideDialog, SuppressCommit, IsHandled);
if IsHandled then
exit;
with ItemJnlLine do begin
Answers
I dont know how you can skip it in business central without changing base app code, there is no hidedialog for this function in my nav version at least.
In classic nav is quite simple but not in BC.
by the way i am using cloud bc, so its not possible to change the standard code.
i will try to use OnBeforeCode
Thanks.