OnGetAssemblyOrders_OnIncludeAssemblyHeader

Use this event to

Add filter conditions for Assembly Headers that cannot be solved by OnSetFilter-event.

 Description

This event is triggered after filters have been applied to Assembly Header. The event should be used only when it is not possible to use OnSetFilter-event to solve if the assembly should be included in the OrderList response.

The assemblies can be excluded from the OrderList response by setting the parameter _IncludeInOrderList to false.

See also: OnGetAssemblyOrders_OnSetFilterAssemblyHeader

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnIncludeAssemblyHeader''', true, true)]
    local procedure OnGetAssemblyOrders_OnIncludeAssemblyHeader(_AssemblyHeader: Record "Assembly Header"; var _IncludeInOrderList: Boolean)
    begin
    end;

Example

    // [Example]   Hide Assembly Orders if Bin Mandatory but assigned 'Output' Bin Code is blocked for movement
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnIncludeAssemblyHeader''', true, true)]
    local procedure MyOnGetAssemblyOrders_OnIncludeAssemblyHeader(_AssemblyHeader: Record "Assembly Header"; var _IncludeInOrderList: Boolean)
    var
        Location: Record Location;
        Bin: Record Bin;
    begin
        if Location.Get(_AssemblyHeader."Location Code") and (Location."Bin Mandatory"then
            if Bin.Get(_AssemblyHeader."Location Code", _AssemblyHeader."Bin Code"then
                if Bin."Block Movement" in [Bin."Block Movement"::All, Bin."Block Movement"::Inbound] then
                    _IncludeInOrderList := false;
    end;


More examples


Version History

VersionChanges
MOB5.24Introduced