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 Change Request] Codeunit 7312 "Create Pick" - OnBeforeTempWhseActivLineInsert #27032

Closed 1languste closed 1 month ago

1languste commented 1 month ago

Describe the request

I want to overwrite the TempWarehouseActivityLine "Shelf No." when the WhseSource2 equals Assembly. Therefore, I request to add WhseSource2 as a new Parameter to the OnBeforeTempWhseActivLineInsert event:

procedure CreateTempActivityLine(
    LocationCode: Code[10]; BinCode: Code[20]; UOMCode: Code[10]; QtyPerUOM: Decimal; QtyToPick: Decimal; QtyToPickBase: Decimal; ActionType: Integer; BreakBulkNo: Integer; QtyRndPrec: Decimal; QtyRndPrecBase: Decimal)
var
    WhseSource2: Option;
    ShouldCalcMaxQty: Boolean;
begin
    // ...
    TransferItemTrkgFields(TempWarehouseActivityLine, TempWhseItemTrackingLine);

    if (BreakBulkNo = 0) and (ActionType <> 2) then
        TotalQtyPickedBase += QtyToPickBase;
    // NEW BEGIN
    OnBeforeTempWhseActivLineInsert(TempWarehouseActivityLine, ActionType, WhseSource2);
    // NEW END
    TempWarehouseActivityLine.Insert();
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeTempWhseActivLineInsert(var TempWarehouseActivityLine: Record "Warehouse Activity Line" temporary; ActionType: Integer; WhseSource2: Option)
begin
end;

Additional context

I want to overwrite the TempWarehouseActivityLine "Shelf No." when the WhseSource2 equals Assembly. Internal work item: AB#544583

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.