Versions Compared

Key

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

Use this event to

Excerpt

Filter Production Order Lines orders (Assembly Headers) to be displayed at the mobile device.

Description

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

See also: OnGetAssemblyOrders_OnIncludeAssemblyHeader

...

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnSetFilterAssemblyHeader''', true, true)]
    local procedure OnGetAssemblyOrders_OnSetFilterAssemblyHeader(_HeaderFilter: Record "MOB NS Request Element"; var _AssemblyHeader: Record "Assembly Header"; var _AssemblyLine: Record "Assembly Line"; var _IsHandled: Boolean)
    begin
    end;

Example

    // [Example]   Display all assembly orders instead of empty list if StartingDate-filter excludes everything
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrders_OnSetFilterAssemblyHeader''', true, true)]
    local procedure MyOnGetAssemblyOrders_OnSetFilterAssemblyHeader(_HeaderFilter: Record "MOB NS Request Element"; var _AssemblyHeader: Record "Assembly Header"; var _AssemblyLine: Record "Assembly Line"; var _IsHandled: Boolean)
    var
        StartingDate: Date;
    begin
        if _HeaderFilter.Name = 'StartingDate' then begin
            StartingDate := _HeaderFilter.GetValueAsDate();
            if StartingDate <> 0D then
                _AssemblyHeader.SetFilter("Starting Date", '<=%1', StartingDate);
            if _AssemblyHeader.IsEmpty() then
                _AssemblyHeader.SetRange("Starting Date");

            _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 = "assembly" and label = "example" and label = "onsetfilter"

...