Versions Compared

Key

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

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Use this event to

Excerpt

Filter Production Consumption Assembly Lines to be displayed at the mobile device ('Consumption').

Description

Affects which Production Consumption Lines are elements for consumption is displayed (lines from Prod. Order Component tablederived from Assembly Line table).
With this event you can perform basic record filtering.


Default behavior is only lines of type 'Item' is displayed.  Text lines and Resource Lines are excluded at the mobile device, but can be enabled using customization (see examples below).

Note

Hidden Resource lines will be posted automatically and proportionally to each partial Quantity To Assemble.

Displayed Item lines MUST be fully registered for each partial Quantity To Assemble meaning default Over-/UnderDelivery 'Blocked' should NOT be changed/customized in the OrderLines list.


See also: OnGetAssemblyOrderLines_OnIncludeAssemblyLine

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdConsumptionLinesOnGetAssemblyOrderLines_OnSetFilterProdOrderComponentOnSetFilterAssemblyLine''', true, true)]
    local procedure OnOnGetProdConsumptionLines OnGetAssemblyOrderLines_OnSetFilterProdOrderComponentOnSetFilterAssemblyLine(var _ProdOrderComponentAssemblyLineRecord "Prod. Order ComponentAssembly Line")
    begin
    end;

Example: Include Text lines and Item lines from the Assembly Lines, but still exclude Resource lines

    // [Example]   Example 01]
    // Include Text lines and Item lines from the Assembly Lines, but still exclude Resource lines
    //
    //  Hidden Resource lines will be posted automatically and proportionally to each partial Quantity To Assemble
    // Hide components if they require picking but nothing is picked yet (partially or fully) 
    // Will show warning at Mobile Device if the list empty Displayed Item lines MUST be fully registered for each partial Quantity To Assemble meaning
    // default Over-/UnderDelivery 'Blocked' should NOT be changed/customized at the 'Consumption' lines.
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Production ConsumptionMOB WMS Assembly", 'OnGetProdConsumptionLinesOnGetAssemblyOrderLines_OnSetFilterProdOrderComponentOnSetFilterAssemblyLine''', true, true)]
    local procedure MyOnGetProdConsumptionLines My01OnGetAssemblyOrderLines_OnSetFilterProdOrderComponentOnSetFilterAssemblyLine(var _ProdOrderComponentAssemblyLineRecord "Prod. Order ComponentAssembly Line")
    var
        Location: Record Location;
        ProdOrderLine: Record "Prod. Order Line";
        RequirePicking: Boolean;
    begin
        if _ProdOrderComponent."Location Code" <> '' then
            RequirePicking := Location.RequirePicking(_ProdOrderComponent."Location Code")
        else begin
            ProdOrderLine.Get(_ProdOrderComponent.Status, _ProdOrderComponent."Prod. Order No.", _ProdOrderComponent."Prod. Order Line No.");
            RequirePicking := Location.RequirePicking(ProdOrderLine."Location Code")
        end;        if RequirePicking then
            _ProdOrderComponent.SetFilter("Qty. Picked", '<>0'begin
        _AssemblyLine.SetFilter(Type'%1|%2', _AssemblyLine.Type::" ", _AssemblyLine.Type::Item);
    end;

Example: Include Resource Lines and Item Lines

    // [Example 02]
    // Include Resource Lines and Item Lines
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine''', true, true)]
    local procedure My02OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
    begin
        _AssemblyLine.SetFilter(Type'%1|%2', _AssemblyLine.Type::Resource, _AssemblyLine.Type::Item);
    end;

Example: Include all lines (Text Lines, Resource Lines and Item Lines)

    // [Example 03]
    // Include all lines (Text Lines, Resource Lines and Item Lines)
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine''', true, true)]
    local procedure My03OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
    begin
        _AssemblyLine.SetRange(Type);
    end;



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

  

Version History

VersionChanges
MOB5.2224Introduced