Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Use this event to

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

Description

Affects which Production Consumption Lines are displayed (lines from Prod. Order Component table).
With this event you can perform basic record filtering.

See also: OnGetAssemblyOrderLines_OnIncludeAssemblyLine

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine''', true, true)]
    local procedure OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
    begin
    end;

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

    // [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
    // 
    // 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 Assembly", 'OnGetAssemblyOrderLines_OnSetFilterAssemblyLine''', true, true)]
    local procedure My01OnGetAssemblyOrderLines_OnSetFilterAssemblyLine(var _AssemblyLine: Record "Assembly Line")
    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;



More examples

There are no items with the selected labels at this time.

  

Version History

VersionChanges
MOB5.24Introduced
  • No labels