ALAppExtensions
ALAppExtensions copied to clipboard
[Event Request] Codeunit 99000830 Create Reserv. Entry - OnBeforeClearTracking
Hello AL-Team, please add the following Publisher(s) in Codeunit 99000803 Create Reserv. Entry:
local procedure SetupSplitReservEntry(var ReservEntry: Record "Reservation Entry"; var ReservEntry2: Record "Reservation Entry")
[...]
if NonReleasedQty <> 0 then begin
TempTrkgSpec1.Init();
TempTrkgSpec1.TransferFields(ReservEntry);
TempTrkgSpec1.Validate("Quantity (Base)", NonReleasedQty);
// >> New
IsHandled := false;
OnBeforeClearTracking(IsHandled,ReservEntry);
If Not IsHandled then
// << New
if (TempTrkgSpec1."Source Type" <> DATABASE::"Item Ledger Entry") and
(ReservEntry."Reservation Status" <> ReservEntry."Reservation Status"::Reservation)
then
TempTrkgSpec1.ClearTracking;
TempTrkgSpec1.Insert();
end;
[...]
if NonReleasedQty <> 0 then begin
TempTrkgSpec2.Init();
TempTrkgSpec2.TransferFields(ReservEntry2);
TempTrkgSpec2.Validate("Quantity (Base)", NonReleasedQty);
// >> New
IsHandled := false;
OnBeforeClearTracking(IsHandled,ReservEntry2);
If Not IsHandled then
// << New
if (TempTrkgSpec2."Source Type" <> DATABASE::"Item Ledger Entry") and
(ReservEntry2."Reservation Status" <> ReservEntry2."Reservation Status"::Reservation)
then
TempTrkgSpec2.ClearTracking;
TempTrkgSpec2.Insert();
end;
BalanceLists;
end;
Publisher definition: IncludeSender: false GlobaVarAccess: false local procedure OnBeforeClearTracking(var IsHandled: Boolean; var NewReservEntry: Record "Reservation Entry")
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.
I´m sorry, but the "IsHandled" will not work as expected when not set to var. Could you please change that?