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 99000854 "Inventory Profile Offsetting" - OnBeforeCreateTempSKUForLocation #27039

Closed 1languste closed 4 weeks ago

1languste commented 1 month ago

Describe the request

When handling the TempSKU insert, I want to set the ItemNo. Therefore, I request to add the ItemNo as a new Parameter to the OnBeforeCreateTempSKUForLocation:

procedure CreateTempSKUForLocation(ItemNo: Code[20]; LocationCode: Code[10])
var
    IsHandled: Boolean;
begin
    IsHandled := false;
    //NEW BEGIN
    OnBeforeCreateTempSKUForLocation(TempSKU, ItemNo, LocationCode, IsHandled);
    //NEW END
    if IsHandled then
        exit;

    TempSKU.Init();
    TempSKU."Item No." := ItemNo;
    TransferPlanningParameters(TempSKU);
    TempSKU."Location Code" := LocationCode;
    if TempSKU."Reordering Policy" <> TempSKU."Reordering Policy"::" " then
        TempSKU.Insert();
end;

[IntegrationEvent(false, false)]
local procedure OnBeforeCreateTempSKUForLocation(var TempStockkeeping: Record "Stockkeeping Unit" temporary; ItemNo: Code[20]; LocationCode: Code[10]; var IsHandled: Boolean)
begin
end;

Additional context

When handling the TempSKU insert, I want to set the TempSKU Item No. to the Item No. parameter value of the procedure. Internal work item: AB#544561

JesperSchulz commented 4 weeks 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: 23103.