Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Event Request] Codeunit 367 - "CheckManagement".SetGenJnlLine - OnBeforeSetGenJnlLine and OnAfterSetGenJnlLine #27830

Open
GiangLNT56 opened this issue Dec 18, 2024 · 0 comments
Labels
event-request Request for adding an event Finance GitHub request for Finance area

Comments

@GiangLNT56
Copy link

GiangLNT56 commented Dec 18, 2024

Describe the request

Dear team,
Could we get the event OnBeforeSetGenJnlLine and OnAfterSetGenJnlLine on Codeunit 367 - "CheckManagement"?

local procedure SetGenJnlLine(var GenJnlLine: Record "Gen. Journal Line"; OriginalAmount: Decimal; CurrencyCode: Code[10]; DocumentNo: Code[20]; Dim1Code: Code[20]; Dim2Code: Code[20]; DimSetID: Integer)
    var
        **IsHandled: Boolean**
    begin
        **IsHandled := false;
        OnBeforeSetGenJnlLine(GenJnlLine, IsHandled);
        If IsHandled then
            exit();**

        GenJnlLine.Validate(Amount, OriginalAmount);
        GenJnlLine.Validate("Currency Code", CurrencyCode);
        MakeAppliesID(GenJnlLine."Applies-to ID", DocumentNo);
        GenJnlLine."Shortcut Dimension 1 Code" := Dim1Code;
        GenJnlLine."Shortcut Dimension 2 Code" := Dim2Code;
        GenJnlLine."Dimension Set ID" := DimSetID;
        GenJnlLine."Source Currency Code" := CurrencyCode;
        
        OnAfterSetGenJnlLine(GenJnlLine);
    end;
[IntegrationEvent(false, false)]
local procedure OnBeforeSetGenJnlLine(var GenJnlLine: Record "Gen. Journal Line"; var IsHandled: Boolean);
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterSetGenJnlLine(var GenJnlLine: Record "Gen. Journal Line");
begin
end;

Thank you in advance!

Additional context

n/a
Internal work item: AB#561101

@haoranpb haoranpb added event-request Request for adding an event Finance GitHub request for Finance area labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-request Request for adding an event Finance GitHub request for Finance area
Projects
None yet
Development

No branches or pull requests

2 participants