-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Closed
Copy link
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update
Description
Why do you need this change?
Hello,
We would like to request a new event in the CheckIfCanBeCopied procedure of Codeunit 181 "Copy Gen. Journal Mgt."
This would allow us to bypass the standard checks and implement our own custom logic.
New Event and Code:
local procedure CheckIfCanBeCopied(var PostedGenJournalLine: Record "Posted Gen. Journal Line")
var
GLRegister: Record "G/L Register";
// New Variable
IsHandled: Boolean;
begin
if PostedGenJournalLine.FindSet() then
repeat
IsHandled := false;
//New Event
OnBeforeCheckIfCanBeCopied(PostedGenJournalLine,IsHandled);
//New Code
if not IsHandled then begin
GLRegister.Get(PostedGenJournalLine."G/L Register No.");
CheckCustomerEntries(GLRegister);
CheckVendorEntries(GLRegister);
end;
until PostedGenJournalLine.Next() = 0;
OnAfterCheckIfCanBeCopied(PostedGenJournalLine);
end;
Signature:
[IntegrationEvent(false, false)]
local procedure OnBeforeCheckIfCanBeCopied(var PostedGenJournalLine: Record "Posted Gen. Journal Line"; var IsHandled: Boolean)
begin
end;
Thank You,
Luca
Describe the request
The event would enable us to bypass the checks on the GLRegister fields in the CheckIfCanBeCopied procedure.
Internal work item: AB#598044
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FinanceGitHub request for Finance areaGitHub request for Finance areaevent-requestRequest for adding an eventRequest for adding an eventships-in-future-updateFix ships in a future updateFix ships in a future update