Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

Excerpt

Add filter conditions for Production Order Lines that cannot be solved by OnSetFilter-event.

...

The Production Order Lines can be excluded from the OrderList response by setting the parameter _IncludeInOrderList to false.

See also: OnGetProdOrderLines_OnSetFilterProdOrderLine

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLine''', true, true)]
    local procedure OnGetProdOrderLines_OnIncludeProdOrderLine(_ProdOrderLine: Record "Prod. Order Line"; _ProductionOrder: Record "Production Order"; var _IncludeInOrderList: Boolean)
    begin
    end;

Example

    // [Example]   Hide Production Order Lines if assigned bin code is blocked for movement
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLine''', true, true)]
    local procedure MyOnGetProdOrderLines_OnIncludeProdOrderLine(_ProdOrderLine: Record "Prod. Order Line"; _ProductionOrder: Record "Production Order"; var _IncludeInOrderList: Boolean)
    var
        Bin: Record Bin;
    begin
        if (_ProdOrderLine."Bin Code" <> '') and (Bin.Get(_ProdOrderLine."Location Code", _ProdOrderLine."Bin Code")) and (Bin."Block Movement" <> Bin."Block Movement"::" "then
            _IncludeInOrderList := false;
    end;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "production" and label = "example" and label = "oninclude"

...