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 7312 "Create Pick" - OnLoopEntrySummaryFEFOBeforeCheckExpirationDate #27035

Closed 1languste closed 1 month ago

1languste commented 1 month ago

Describe the request

I want to perform additional business logic before every FEFO Entry Summary loop step. Therefore, I request the following event:

local procedure CreateTempItemTrkgLines(ItemNo: Code[20]; VariantCode: Code[10]; TotalQtyToPickBase: Decimal; HasExpiryDate: Boolean)
    var
        //...
    begin
        // ...
        RemQtyToPickBase := TotalQtyToPickBase;
        if HasExpiryDate then
            TransferRemQtyToPickBase := TotalQtyToPickBase;
        if WhseItemTrackingFEFO.FindFirstEntrySummaryFEFO(EntrySummary) then begin
            ReqFEFOPick := true;
            repeat
                // NEW BEGIN
                OnLoopEntrySummaryFEFOBeforeCheckExpirationDate(EntrySummary, CurrSourceType, CurrSourceSubType, CurrSourceNo, CurrSourceLineNo, CurrSourceSubLineNo)
                // NEW END
                if ((EntrySummary."Expiration Date" <> 0D) and HasExpiryDate) or
                   ((EntrySummary."Expiration Date" = 0D) and (not HasExpiryDate))
                then begin
                    WhseItemTrackingSetup.CopyTrackingFromEntrySummary(EntrySummary);
                    QtyTracked := ItemTrackedQuantity(WhseItemTrackingSetup);
                    OnCreateTempItemTrkgLinesOnAfterCalcQtyTracked(EntrySummary, TempWhseItemTrackingLine, QtyTracked);
                    // ...

[IntegrationEvent(false, false)]
local procedure OnLoopEntrySummaryFEFOBeforeCheckExpirationDate(var EntrySummary: Record "Entry Summary"; SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSubLineNo: Integer)
begin
end;

Additional context

I want to document if the Serial or Lot No. is blocked based on the Entry Summary for every loop step. Internal work item: AB#544559

JesperSchulz commented 1 month 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: 23054.