microsoft / ALAppExtensions

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

[Event Change Request] Codeunit 7312 "Create Pick" - OnAfterCreateTempLineCheckReservation #27026

Closed 1languste closed 2 months ago

1languste commented 2 months ago

Describe the request

I want to document the QtyBaseMaxAvailToPick in a custom logistics log. Therefore, I request to add QtyBaseMaxAvailToPick as a new Parameter to the OnAfterCreateTempLineCheckReservation event:

local procedure CheckReservationAndUpdateQtyToPick(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; UnitOfMeasureCode: Code[10]; FromBinCode: Code[20]; QtyPerUnitofMeasure: Decimal; var TotalQtyToPick: Decimal; var TotalQtyToPickBase: Decimal): Boolean;
var
    QtyBaseMaxAvailToPick: Decimal;
    IsHandled: Boolean;
begin
    //...
            // Reduce the TotalQtyToPick based on the max available quantity to pick and existing reservations.
            CheckReservation(
                QtyBaseMaxAvailToPick, CurrSourceType, CurrSourceSubType, CurrSourceNo, CurrSourceLineNo, CurrSourceSubLineNo, CurrLocation."Always Create Pick Line",
                QtyPerUnitofMeasure, TotalQtyToPick, TotalQtyToPickBase);

            if not CurrLocation."Always Create Pick Line" then
                if TotalQtyToPickBase = 0 then
                    exit(true); //TotalQtyToPickBase is modified and Error reason is enqueued in procedure CheckReservation(...)
        end;
    // NEW BEGIN
    OnAfterCreateTempLineCheckReservation(
        LocationCode, ItemNo, VariantCode, UnitofMeasureCode, QtyPerUnitofMeasure, TotalQtytoPick, TotalQtytoPickBase, QtyBaseMaxAvailToPick
        CurrSourceType, CurrSourceSubType, CurrSourceNo, CurrSourceLineNo, CurrSourceSubLineNo, LastWhseItemTrkgLineNo, TempWhseItemTrackingLine, CurrWarehouseShipmentLine);
    // NEW END

[IntegrationEvent(false, false)]
local procedure OnAfterCreateTempLineCheckReservation(LocationCode: Code[10]; ItemNo: Code[20]; VariantCode: Code[10]; UnitofMeasureCode: Code[10]; QtyPerUnitofMeasure: Decimal; var TotalQtytoPick: Decimal; var TotalQtytoPickBase: Decimal; var QtyBaseMaxAvailToPick: Decimal; SourceType: Integer; SourceSubType: Option; SourceNo: Code[20]; SourceLineNo: Integer; SourceSubLineNo: Integer; var LastWhseItemTrkgLineNo: Integer; var TempWhseItemTrackingLine: Record "Whse. Item Tracking Line" temporary; var WhseShptLine: Record "Warehouse Shipment Line")
begin
end;

Additional context

I want to document the QtyBaseMaxAvailToPick in a custom logistics log. Internal work item: AB#544584

JesperSchulz commented 2 months 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.