Versions Compared

Key

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


Info
titleRequirements
  • Extension version MOB5.26
  • Android App 1.5.8 

...

To group a number of lines, two events is needed to get the group working: One event to define how lines are grouped (mandatory) and one event to handle how each group is displayed at the mobile device (optional).

  • 'OnGetXXXOrderLines_OnAfterSetFromXXX' : Use any SetFrom-event from (planned) Wms Document Handlers to define how lines are grouped
  • 'OnAfterGroupByBaseOrderLineElements' : Triggered once per group. Here you can optionally change how the "grouped" element is displayed at the mobile device

  • (Also, changes are needed to application.cfg to enable the group/ungroup functionatlity see below)

...

    // Putaway: Decide which elements can be grouped (SN specific tracking)
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Put Away", 'OnGetPutAwayOrderLines_OnAfterSetFromWarehouseActivityLine''', true, true)]
    local procedure OnGetPutAwayOrderLines_OnAfterSetFromWarehouseActivityLine(_WhseActLineTake: Record "Warehouse Activity Line"; var _BaseOrderLineElement: Record "MOB NS BaseDataModel Element")
    var
        Item: Record Item;
        ItemTrackingCode: Record "Item Tracking Code";
    begin
        Item.Get(_WhseActLineTake."Item No.");
        if (ItemTrackingCode.Get(Item."Item Tracking Code") and ItemTrackingCode."SN Specific Tracking"then begin
            // Group SN Specific Tracked items
            _BaseOrderLineElement.SetGroupBy('ItemNumber,UnitOfMeasure,FromBin,ToBin');
            _BaseOrderLineElement.SetValue('MyGroupName''PutAway.GroupBySerialNumber');  // Some unique identifier for this GroupBy condition to look for in OnAfterGroupBy-event
        end;
    end;


    // Putaway: Handle appearance of "grouped" element to be displayed at mobile device
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Base Document Handler", 'OnAfterGroupByBaseOrderLineElements''', true, true)]
    local procedure OnAfterGroupByBaseOrderLineElements(var _GroupOrderLineElement: Record "MOB Ns BaseDataModel Element"; var _IsGrouped: Booleanvar _BaseOrderLineElements: Record "MOB Ns BaseDataModel Element"; var _IsHandled: Boolean)
    begin
        if (_GroupOrderLineElement.GetValue('MyGroupName''PutAway.GroupBySerialNumber'then begin
            _IsGrouped := _BaseOrderLineElements.Count() 1;   // Suppress grouping if this group includes only a single element
            _GroupOrderLineElement.Set_DisplayLine4(StrSubstNo('Serial No.: Yes'));     // Only used if the elements is actually grouped

            // Optional: Since these elements can be grouped/ungrouped on the fly at the mobile device, add some text to indicate this
            if _IsGrouped then begin
                _BaseOrderLineElements.FindSet();
                repeat
                    _BaseOrderLineElements.Set_DisplayLine4(_BaseOrderLineElements.Get_DisplayLine4() '  (can be grouped)');
                until _BaseOrderLineElements.Next() 0;
            end;
            _IsHandled := true;
        end;
    end;

Step 2: Enable in Mobile config

...

  • Stays in the "flow" for SN tracked item no. TF-004 until the full quanity is recorded
  • Serial numbers can be scanned in any order
  • Serial numbers is validated on posting rather than on entry









Ungroup and group lines on the fly

When a number of lines is grouped, you ungroup and re-group on the fly at the mobile device.

...

This Grouping order lines knowledgebase article explains what is happening "behind the scenes", including how registered quantities are distributed among grouped lines.
The changes to the Xml response format for grouped elements (as explained in that article) are handled implicitely by the _BaseOrderLineElement.SetGroupBy()-method, as in the example above.

...

Filter by label (Content by label)
showLabelsfalse
max150
showSpacefalse
titleSee also
excludeCurrenttrue
cqllabel = "grouping"