Event Request C80 & C90
We would like to request a new IntegrationEvent for Codeunits 80 and 90 that can post additional entries as part of a single GL Register. The key variable is passing GenJnlPostLine as VAR.
Codeunit 80 NEW IntegrationEvent LOCAL [IntegrationEvent] OnAfterPostGLAndCustomer(VAR SalesHeader : Record "Sales Header";VAR GenJnlPostLine : Codeunit "Gen. Jnl.-Post Line";CustLedgerEntry : Record "Cust. Ledger Entry";TotalSalesLine : Record "Sales Line";TotalSalesLineLCY : Record
Called from OnRun .... IF NOT SalesHeader.IsCreditDocType THEN BEGIN ReverseAmount(TotalSalesLine); ReverseAmount(TotalSalesLineLCY); TotalSalesLineLCY."Unit Cost (LCY)" := -TotalSalesLineLCY."Unit Cost (LCY)"; END;
PostDropOrderShipment(SalesHeader,TempDropShptPostBuffer); IF SalesHeader.Invoice THEN PostGLAndCustomer(SalesHeader,TempInvoicePostBuffer,CustLedgEntry);
//HERE OnAfterPostGLAndCustomer(SalesHeader,GenJnlPostLine,CustLedgEntry,TotalSalesLine,TotalSalesLineLCY);
IF ICGenJnlLineNo > 0 THEN PostICGenJnl;
MakeInventoryAdjustment; UpdateLastPostingNos(SalesHeader); ....
This pattern to be replicated for Codeunit 90.
Thanks to SirBete to file this request through Partner Source / CSS. This is now resolved and will be included in the application base with NAV 2018 CU 5 (May 2018 CU)