Skip to content

[Event Request] Codeunit 181 "Copy Gen. Journal Mgt." #30403

Description

@bogdangarkusha

Why do you need this change?

Please add a new event in the ShowFinishMessage to have a possibility to ignore the FinishMessage and run custom functionality.

Describe the request

local procedure ShowFinishMessage(LineCount: Integer; CopyGenJournalParameters: Record "Copy Gen. Journal Parameters")
   var
       GenJournalBatch: Record "Gen. Journal Batch";
       ConfirmManagement: Codeunit "Confirm Management";
       GenJnlManagement: Codeunit GenJnlManagement;
       IsHandled: Boolean;
   begin
       // >>>
       IsHandled := false;
       OnBeforeShowFinishMessage(LineCount, CopyGenJournalParameters);
       if IsHandled then
           exit();
       // <<<

       if ConfirmManagement.GetResponse(StrSubstNo(CopiedLinesTxt, LineCount), false) then begin
           GenJournalBatch.Get(CopyGenJournalParameters."Journal Template Name", CopyGenJournalParameters."Journal Batch Name");
           GenJnlManagement.TemplateSelectionFromBatch(GenJournalBatch);
       end;
   end;
[IntegrationEvent(false, false)]
    local procedure OnBeforeShowFinishMessage(LineCount: Integer; CopyGenJournalParameters: Record "Copy Gen. Journal Parameters"; var IsHandled: Boolean)
    begin
    end;

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing-infoThe issue misses information that prevents it from completion.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions