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] REP5880 Calc. Phys. Invt. Order Lines - DataItem Item - OnBeforeCheckItemBlocked #26969

Closed MH1612 closed 1 week ago

MH1612 commented 1 month ago

Describe the request

Please add the following Event/-s OnBeforeCheckItemBlocked to DataItem Item in REP5880 Calc. Phys. Invt. Order Lines.

[Event Request] REP5880 Calc. Phys. Invt. Order Lines - DataItem Item - OnBeforeCheckItemBlocked
        dataitem(Item; Item)
        {
            RequestFilterFields = "No.", "Inventory Posting Group", "Gen. Prod. Posting Group", "Item Category Code", "Variant Filter", "Location Filter", "Bin Filter", "Date Filter";

            trigger OnAfterGetRecord()
            begin
                if not HideValidationDialog then
                    Window.Update(1, "No.");

                Clear(LastItemLedgEntry);

                // NEW
                // if not Blocked then
                ItemBlockedL := Blocked;
                OnBeforeCheckItemBlocked(Item,PhysInvtOrderHeader,ItemBlockedL);
                if not ItemBlockedL then
                // NEW    
                    CalcItemPhysInvtOrderLines()
                else
                    ItemsBlocked := true;
            end;
 [IntegrationEvent(false, false)]
 local procedure OnBeforeCheckItemBlocked(var Item : Record Item; PhysInvtOrderHeader: Record "Phys. Invt. Order Header"; var ItemBlockedL : Boolean)
    begin
    end;

Additional context

Do an Additional Blocking-Check Internal work item: AB#544504

AleksandricMarko commented 1 month ago

Hello @MH1612 In procedure CalcItemPhysInvtOrderLines() you have OnBeforeCalcItemPhysInvtOrderLines which you can use to make additional check on item

MH1612 commented 2 weeks ago

Hello I will forward the request internally. My colleague is currently still on vacation, we will answer next week.

SKeiler commented 1 week ago

Hi @AleksandricMarko

We also need the IsHandled-Event because in some cases we want also to create inventory lines for blocked items. So the OnBeforeCalcItemPhysInvtOrderLines -Event is unfortunaly to late for us :-(

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