Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Use this event to

Control if Warehouse Receipt Header should be included in the Order List Response

Description

This event is triggered after filters have been applied to the Warehouse Receipt Header. The procedure should be used when it's not possible to determine from filters if the Header should be included in the Order List Response.

You can use the event to control if the Warehouse Receipt Header should be included in the Order List response by setting the parameter _IncludeInOrderList to false.


Template  

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnIncludeWarehouseReceiptHeader''', true, true)]
    procedure OnGetReceiveOrders_OnIncludeWarehouseReceiptHeader(_WhseReceiptHeader: Record "Warehouse Receipt Header"; var _IncludeInOrderList: Boolean)
    begin
    end;


Example: Do not include in order list if Vendor is blocked.

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Receive", 'OnGetReceiveOrders_OnIncludeWarehouseReceiptHeader''', true, true)]
    procedure MyOnGetReceiveOrders_OnIncludeWarehouseReceiptHeader(_WhseReceiptHeader: Record "Warehouse Receipt Header"; var _IncludeInOrderList: Boolean)
    var
        WhseReceiptLine: Record "Warehouse Receipt Line";
        PurchaseHeader: Record "Purchase Header";
        Vendor: Record Vendor;
    begin
        if WhseReceiptLine.FindSet() then
            repeat
                if WhseReceiptLine."Source Document" = WhseReceiptLine."Source Document"::"Purchase Order" then begin
                    PurchaseHeader.Get(WhseReceiptLine."Source Subtype", WhseReceiptLine."Source No.");
                    if Vendor.Get(PurchaseHeader."Buy-from Vendor No.") and not (Vendor.Blocked < Vendor.Blocked::Allthen
                        _IncludeInOrderList := false;
                end;
            until (WhseReceiptLine.Next() 0) or not _IncludeInOrderList;
    end;


More examples


Version History

VersionChanges
MOB5.13Introduced
  • No labels