Why do you need this change?
We need to restore a previously captured G/L Register state, including the next VAT entry number and next transaction number, into the GenJnlPostLine codeunit instance held internally by Codeunit 5802 "Inventory Posting to G/L". This is required when coordinating posting across multiple inventory posting calls where the register state must be captured before a run and restored afterward to preserve correct register sequencing.
The standard Codeunit 5802 holds GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line" as a private codeunit-level variable. Codeunit "Gen. Jnl.-Post Line" already exposes SetGLRegister as a public procedure. However, Codeunit 5802 has no corresponding public procedure that delegates to GenJnlPostLine.SetGLRegister, so external code cannot set this state without direct access to the internal variable.
No existing public procedure or event on Codeunit 5802 allows an external caller to write GLReg, NextVATEntryNo, or NextTransactionNo back to the internal GenJnlPostLine instance. This is the symmetric counterpart to the missing GetGLRegister procedure.
Describe the request
Add a public procedure SetGLRegister in Codeunit 5802 "Inventory Posting to G/L" that delegates to the internal GenJnlPostLine.SetGLRegister.
procedure SetGLRegister(var GLReg: Record "G/L Register"; NextVATEntryNo: Integer; NextTransactionNo: Integer)
begin
GenJnlPostLine.SetGLRegister(GLReg, NextVATEntryNo, NextTransactionNo);
end;
Alternatives evaluated: There is no public procedure on Codeunit 5802 that writes to the internal GenJnlPostLine register state. No event on Codeunit 5802 exposes GenJnlPostLine as a var parameter that would allow a subscriber to call SetGLRegister on it directly. There is no other public path to restore all three values together.
Why do you need this change?
We need to restore a previously captured G/L Register state, including the next VAT entry number and next transaction number, into the
GenJnlPostLinecodeunit instance held internally by Codeunit 5802 "Inventory Posting to G/L". This is required when coordinating posting across multiple inventory posting calls where the register state must be captured before a run and restored afterward to preserve correct register sequencing.The standard Codeunit 5802 holds
GenJnlPostLine: Codeunit "Gen. Jnl.-Post Line"as a private codeunit-level variable. Codeunit "Gen. Jnl.-Post Line" already exposesSetGLRegisteras a public procedure. However, Codeunit 5802 has no corresponding public procedure that delegates toGenJnlPostLine.SetGLRegister, so external code cannot set this state without direct access to the internal variable.No existing public procedure or event on Codeunit 5802 allows an external caller to write
GLReg,NextVATEntryNo, orNextTransactionNoback to the internalGenJnlPostLineinstance. This is the symmetric counterpart to the missingGetGLRegisterprocedure.Describe the request
Add a public procedure
SetGLRegisterin Codeunit 5802 "Inventory Posting to G/L" that delegates to the internalGenJnlPostLine.SetGLRegister.Alternatives evaluated: There is no public procedure on Codeunit 5802 that writes to the internal GenJnlPostLine register state. No event on Codeunit 5802 exposes GenJnlPostLine as a var parameter that would allow a subscriber to call SetGLRegister on it directly. There is no other public path to restore all three values together.