microsoft / ALAppExtensions

Repository for collaboration on Microsoft AL application add-on and localization extensions for Microsoft Dynamics 365 Business Central.
MIT License
770 stars 610 forks source link

[Event Request] Codeunit 5817 Undo Posting Management - Procedure RevertPostedItemTracking - OnRevertPostedItemTrackingOnBeforeGetTrackingSpecification #27043

Closed MH1612 closed 1 week ago

MH1612 commented 1 month ago

Describe the request

Please add the following Event/-s OnRevertPostedItemTrackingOnBeforeGetTrackingSpecification to Procedure RevertPostedItemTracking in Codeunit 5817 Undo Posting Management.

procedure RevertPostedItemTracking(var TempItemLedgEntry: Record "Item Ledger Entry" temporary; AvailabilityDate: Date; RevertInvoiced: Boolean)
begin
        IsHandled := false;
        OnBeforeRevertPostedItemTracking(TempItemLedgEntry, AvailabilityDate, RevertInvoiced, IsHandled);
        if not IsHandled then
            with TempItemLedgEntry do
                if Find('-') then begin
                    repeat
                        IsHandled := false;
                        OnRevertPostedItemTrackingOnBeforeGetTrackingSpecification(TempItemLedgEntry,IsHandled)
                        if not IsHandled then
                            TrackingSpecification.Get("Entry No.");
                            QtyToRevert := TrackingSpecification."Quantity Invoiced (Base)";

                            IsHandled := false;
                            OnRevertPostedItemTrackingOnBeforeUpdateReservEntry(TempItemLedgEntry, TrackingSpecification, IsHandled);
                        (...)
                        end;
end;
[IntegrationEvent(false, false)]
local procedure OnRevertPostedItemTrackingOnBeforeGetTrackingSpecification(var TempItemLedgEntry: Record "Item Ledger Entry" temporary;IsHandled: Boolean)
    begin
    end;

Additional context

Special cases without TrackingSpecificaion run on errors Internal work item: AB#544562

JesperSchulz commented 1 week ago

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. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.

Build ID: 23752.