Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use this event to

Excerpt

Filter Production Order Lines to be displayed at the mobile device.

Description

Affects which Production Order Lines are displayed. This event "handles" each filter.
With this event you can perform basic record filtering of Orders Lines.

See also: TODO OnGetProdOrderLines_OnIncludeProdOrderLine

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS MoveMOB WMS Production Consumption", 'OnGetMoveOrdersOnGetProdOrderLines_OnSetFilterWarehouseActivityOnSetFilterProdOrderLine''', true, true)]
    local procedure OnGetMoveOrders OnGetProdOrderLines_OnSetFilterWarehouseActivityOnSetFilterProdOrderLine(_HeaderFilter: Record "MOB NS Request Element"; var _IsHandledProdOrderLine: Boolean Record "Prod. Order Line"var _WhseActivityHeaderProductionOrderRecord "Warehouse Activity HeaderProduction Order"; var _WhseActivityLineIsHandledRecord "Warehouse Activity Line"Boolean)
    begin
    end;

Example

    // [Example]   Display all production orders instead of empty list if StartingDate-filter excludes everything
      [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS MoveMOB WMS Production Consumption", 'OnGetMoveOrdersOnGetProdOrderLines_OnSetFilterWarehouseActivityOnSetFilterProdOrderLine''', true, true)]
    local procedure OnGetMoveOrders MyOnGetProdOrderLines_OnSetFilterWarehouseActivityOnSetFilterProdOrderLine(_HeaderFilter: Record "MOB NS Request Element"; var _IsHandledProdOrderLineBooleanRecord "Prod. Order Line"var _WhseActivityHeaderProductionOrderRecord "Warehouse Activity HeaderProduction Order"; var _WhseActivityLineIsHandledRecord "Warehouse Activity Line"Boolean)
    begin
        // [Scenario] Exclude orders with Assignment Date different than today if location is "MyLocation"var
        StartingDate: Date;
    begin
        if _HeaderFilter.Name = 'LocationStartingDate' then
            if begin
            StartingDate := _HeaderFilter."Value" IN ['MyLocation'GetValueAsDate();
            if StartingDate <> 0D then
                _WhseActivityHeaderProdOrderLine.SetFilter("Assignment DateStarting Date-Time", '=%1', WorkDate());
        // Don't handle the filter, we still want the standard Location filter to be set.<%1', CreateDateTime(StartingDate + 1, 0T));
            if _ProdOrderLine.IsEmpty() then
                _ProdOrderLine.SetRange("Starting Date-Time");

            _IsHandled := true;
        end;
    end;

Example 2: Add custom filters to Standard headers

You want to add an additional filter to a existing header.


Example 3: Handle custom header filter



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

  

Version History

VersionChanges
MOB5.22Introduced