[Event Request] Codeunit 1101 CA Jnl.-Check Line - OnAfterRunCheck
We need a new event function in CU 1101 "CA Jnl.-CheckLine", named OnAfterRunCheck
LOCAL [IntegrationEvent] OnAfterRunCheck(VAR CostJnlLine : Record "Cost Journal Line")
called from RunCheck Function:
[External] RunCheck(VAR CostJnlLine : Record "Cost Journal Line") WITH CostJnlLine DO BEGIN TESTFIELD("Posting Date"); TESTFIELD("Document No."); ......... ........ ........ IF ("Bal. Cost Center Code" = '') AND ("Bal. Cost Object Code" = '') THEN ERROR(Text002,"Line No.","Document No.",Amount); IF ("Bal. Cost Center Code" <> '') AND ("Bal. Cost Object Code" <> '') THEN ERROR(Text003,"Line No.","Document No.",Amount); END;
IF GenJnlCheckLine.DateNotAllowed("Posting Date") THEN FIELDERROR("Posting Date",Text005); END; //INIT-INSERT OnAfterRunCheck(CostJnlLine); //END-INSERT
Same event has been already requested, approved and closed: https://github.com/microsoft/ALAppExtensions/issues/4829
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability.