Why do you need this change?
#30007 and #30093
Once GetRegisters on CU 22 is public (see companion request-for-external issue), a subscriber calling it can read ItemReg and ItemApplnEntryNo directly. However, the Warehouse Register state (WhseReg2) and G/L Register state (GLReg2, NextVATEntryNo2, NextTransactionNo2) are not fields on CU 22; they reside in Whse. Jnl.-Register Line (CU 7301) and Inventory Posting to G/L. There is no way for GetRegisters itself to read those values without taking a dependency on other codeunit instances that the caller already holds. The OnBeforePostItemJnlLineWhseLine subscriber in Purch.-Post needs to supply all six register values to WhseJnlPostLine.SetRegisters in a single call. An OnGetRegisters event placed inside GetRegisters, after the Item Register fields are populated, lets each subscriber populate the remaining output parameters (WhseReg2, GLReg2, NextVATEntryNo2, NextTransactionNo2) from the appropriate source without requiring CU 22 to take a hard dependency on CU 7301 or Inventory Posting to G/L.
Describe the request
[W1][Codeunit][22][Item Jnl.-Post Line]
GetRegisters
Fires inside GetRegisters after the Item Register fields are copied out, so subscribers can populate WhseReg2, GLReg2, NextVATEntryNo2, and NextTransactionNo2 from their respective source codeunits before the caller receives the complete register snapshot.
[IntegrationEvent(false, false)]
local procedure OnGetRegisters(
var ItemReg2: Record "Item Register";
var ItemApplnEntryNo2: Integer;
var WhseReg2: Record "Warehouse Register";
var GLReg2: Record "G/L Register";
var NextVATEntryNo2: Integer;
var NextTransactionNo2: Integer)
begin
end;
Why do you need this change?
#30007 and #30093
Once GetRegisters on CU 22 is public (see companion request-for-external issue), a subscriber calling it can read ItemReg and ItemApplnEntryNo directly. However, the Warehouse Register state (WhseReg2) and G/L Register state (GLReg2, NextVATEntryNo2, NextTransactionNo2) are not fields on CU 22; they reside in Whse. Jnl.-Register Line (CU 7301) and Inventory Posting to G/L. There is no way for GetRegisters itself to read those values without taking a dependency on other codeunit instances that the caller already holds. The OnBeforePostItemJnlLineWhseLine subscriber in Purch.-Post needs to supply all six register values to WhseJnlPostLine.SetRegisters in a single call. An OnGetRegisters event placed inside GetRegisters, after the Item Register fields are populated, lets each subscriber populate the remaining output parameters (WhseReg2, GLReg2, NextVATEntryNo2, NextTransactionNo2) from the appropriate source without requiring CU 22 to take a hard dependency on CU 7301 or Inventory Posting to G/L.
Describe the request
[W1][Codeunit][22][Item Jnl.-Post Line]
GetRegisters
Fires inside GetRegisters after the Item Register fields are copied out, so subscribers can populate WhseReg2, GLReg2, NextVATEntryNo2, and NextTransactionNo2 from their respective source codeunits before the caller receives the complete register snapshot.