ALAppExtensions icon indicating copy to clipboard operation
ALAppExtensions copied to clipboard

[Event Request] Table 5878 Phys. Invt. Record Line - field20 - OnValidate "OnValidateItemNoBeforeSetBinCode"

Open MH1612 opened this issue 4 years ago • 2 comments

Can we please get the following event?

        field(20; "Item No."; Code[20])
        {
            Caption = 'Item No.';
            TableRelation = Item;

            trigger OnValidate()
            var
                TempPhysInvtRecordLine: Record "Phys. Invt. Record Line" temporary;
            begin

                ...

                "Date Recorded" := PhysInvtRecordHeader."Date Recorded";
                "Time Recorded" := PhysInvtRecordHeader."Time Recorded";
                "Person Recorded" := PhysInvtRecordHeader."Person Recorded";
                "Location Code" := PhysInvtRecordHeader."Location Code";

                IsHandled := false;
                OnValidateItemNoBeforeSetBinCode(Rec, PhysInvtRecordHeader, IsHandled); <-- NEW EVENT
                if not IsHandled then begin
                   "Bin Code" := PhysInvtRecordHeader."Bin Code";
                end;

                "Use Item Tracking" := PhysInvtTrackingMgt.SuggestUseTrackingLines(Item);
                GetShelfNo();
            end;
        }
    [IntegrationEvent(false, false)]
    local procedure OnValidateItemNoBeforeSetBinCode(PhysInvtRecordLine: Record "Phys. Invt. Record Line"; PhysInvtRecordHeader: Record "Phys. Invt. Record Header"; var IsHandled: Boolean)
    begin
    end;

MH1612 avatar May 05 '22 10:05 MH1612

Hi,

Is it ok for you to use existing event OnAfterValidateItemNo?

Rgds, Oleg.

Oleg-Romashkov avatar May 11 '22 09:05 Oleg-Romashkov

Thank you for your comment. Yes, we can also solve it via the suggested event.

MH1612 avatar May 12 '22 09:05 MH1612