microsoft / ALAppExtensions

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

[Request-For-External] TAB5878 "Phys. Invt. Record Line" - Procedure InsertTrackingBuffer #26920

Closed MH1612 closed 1 week ago

MH1612 commented 1 month ago

Describe the request

Hello, we need the following currently Internal procedure to be set as Global. Can you please check this? Thank you!

[Request-For-External] TAB5878 "Phys. Invt. Record Line" - Procedure InsertTrackingBuffer

#if not CLEAN24
    procedure InsertTrackingBuffer(var TempPhysInvtTracking: Record "Phys. Invt. Tracking" temporary; SerialNo: Code[50]; LotNo: Code[50]; QtyBase: Decimal)
    begin
        if (SerialNo <> '') or (LotNo <> '') then begin
            if not TempPhysInvtTracking.Get(SerialNo, LotNo) then begin
                TempPhysInvtTracking.Init();
                TempPhysInvtTracking."Lot No" := LotNo;
                TempPhysInvtTracking."Serial No." := SerialNo;
                TempPhysInvtTracking.Insert();
            end;
            TempPhysInvtTracking."Qty. Expected (Base)" += QtyBase;
            TempPhysInvtTracking.Modify();
        end;
    end;
#endif

    procedure InsertTrackingBuffer(var TempInvtOrderTracking: Record "Invt. Order Tracking" temporary; ItemTrackingSetup: Record "Item Tracking Setup"; ExpirationDate: Date; QtyBase: Decimal)
    begin
        if ItemTrackingSetup.TrackingExists() then begin
            if not TempInvtOrderTracking.Get(ItemTrackingSetup."Serial No.", ItemTrackingSetup."Lot No.", ItemTrackingSetup."Package No.") then begin
                TempInvtOrderTracking.Init();
                TempInvtOrderTracking."Serial No." := ItemTrackingSetup."Serial No.";
                TempInvtOrderTracking."Lot No." := ItemTrackingSetup."Lot No.";
                TempInvtOrderTracking."Package No." := ItemTrackingSetup."Package No.";
                TempInvtOrderTracking."Expiration Date" := ExpirationDate;
                TempInvtOrderTracking.Insert();
            end;
            TempInvtOrderTracking."Qty. Expected (Base)" += QtyBase;
            TempInvtOrderTracking.Modify();
        end;
    end;

Additional context

Call it out of the IsHandled-Event from OnBeforeShowUsedTrackLines Internal work item: AB#542996

azure-boards[bot] commented 1 month ago

✅ Successfully linked to Azure Boards work item(s):

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: 23634.