Hi,
I am trying to post a journal with a specific document no through code, I am using the Gen Jnl Post codeunit but all the lines in the journal are being posted.
Ex
:
I only want to post lines with doc no 12346, below is my code
GenJnlLine.Reset();
GenJnlLine.SetFilter("Document No.", DocumentNo); //This is a variable being filled with the doc no to be posted
if GenJnlLine.FindFirst() then begin
Codeunit.Run(Codeunit::"Gen. Jnl.-Post", GenJnlLine);
end;
Thanks in advance


Report
All responses (
Answers (