Versions Compared

Key

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

Use this event to

...

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLineOnSetFilterProdOrderLine''', true, true)]
    local procedure OnGetProdOrderLines_OnIncludeProdOrderLineOnSetFilterProdOrderLine(_HeaderFilter: Record "MOB NS Request Element"; var _ProdOrderLine: Record "Prod. Order Line"; var _ProductionOrder: Record "Production Order"; var _IncludeInOrderListIsHandledBoolean)
    begin
    end;

Example

    // [Example]   Hide Production Order Lines if assigned bin code is blocked for movement   Display all production orders instead of empty list if StartingDate-filter excludes everything
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production Consumption", 'OnGetProdOrderLines_OnIncludeProdOrderLineOnSetFilterProdOrderLine''', true, true)]
    local procedure MyOnGetProdOrderLines_OnIncludeProdOrderLine(OnSetFilterProdOrderLine(_HeaderFilter: Record "MOB NS Request Element"; var _ProdOrderLine: Record "Prod. Order Line"; var _ProductionOrder: Record "Production Order"; var _IncludeInOrderListIsHandledBoolean)
    var
        Bin        StartingDateRecord BinDate;
    begin
        if (_ProdOrderLine."Bin Code" <> '') and (Bin.Get(_ProdOrderLine."Location Code", _ProdOrderLine."Bin Code")) and (Bin."Block Movement" <> Bin."Block Movement"::" "then
            _IncludeInOrderList := falseHeaderFilter.Name = 'StartingDate' then begin
            StartingDate := _HeaderFilter.GetValueAsDate();
            if StartingDate <> 0D then
                _ProdOrderLine.SetFilter("Starting Date-Time", '<%1', CreateDateTime(StartingDate + 1, 0T));
            if _ProdOrderLine.IsEmpty() then
                _ProdOrderLine.SetRange("Starting Date-Time");

            _IsHandled := true;
        end;
    end;


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

...