Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Simplify

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Description

Excerpt

Fix registrations received from the mobile device before processing them

The posting of a planned order (pick/receive/count / etc.) from the Mobile WMS solution goes through the following stages:

  1. Extract the order line registrations sent in by the mobile device and store them in the "MOB WMS Registration" table
  2. Loop through the registrations and update the related order lines
  3. Call the standard posting-codeunit

In some cases, we can implement customizations to the data collection process on the mobile device and still re-use reuse the standard code that processes the registrations.
The trick is to modify registrations before the code that processes the registrations is executed.

This can be done in OnBefore-events like like OnPostPickOrder_OnBeforePostWarehouseActivityOrder

Use case

In the picking scenario, the mobile user typically scans both the bin barcode and the item barcodeBin and Item barcodes. This is to validate that he is picking the right item from the right bin.
Scanning the bin also gives the user flexibility to pick from another bin if the item cannot be found in the expected bin.

In a scenario where the item to pick uses serial numbers, the bin code scan looses it loses its value because the serial number can only be in one bin.
As long as the user scans the serial number we are 100% sure that the right item is picked. In this scenario, we can turn off bin validation to speed up the process.

...

This problem can be solved by modifying the "From Bin" in the MOB WMS Registration -record.
The MOB WMS Registration tells which Serial Number is picked. This allows us to determine which bin it is in and update the "From Bin".

This way we can allow the mobile user to just scan the serial numbers and handle the "From Bins" in the background.

Technical Background Details

Every time the mobile device sends a request to BC it is stored in the "Mobile Document Queue" and each request has a unique "Message ID".
The "Message ID" for a posting request is registered on the related document in the "MOB Posting MessageId" field.

The registrations in the MOB WMS Registration table are also "stamped" with this message id and this can be use used to find all registrations related to a specific posting transaction.
If an order is partially posted multiple times, each posting will have a unique message id and the MOB WMS Registrations will reflect that.

How to enable it

To "fix" the raw registrations received from the mobile device , you need can subscribe to hook into an xxx_OnBeforePostYYY event-events.

Example

[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnPostPickOrder_OnBeforePostWarehouseActivityOrder', '', true, true)]
    procedure OnPostPickOrder_OnBeforePostWarehouseActivityOrder(var _OrderValues: Record "MOB Common Element"; var _WhseActivityHeader: Record "Warehouse Activity Header")
    var
        MobWmsRegistration: Record "MOB WMS Registration";
    begin
        // Find the registrations related to this posting operation
        MobWmsRegistration.SetCurrentKey("Posting MessageId");
        MobWmsRegistration.SetRange("Posting MessageId", _WhseActivityHeader."MOB Posting MessageId");
        if MobWmsRegistration.FindSet(true) then
            repeat
                if MobWmsRegistration.SerialNumber <> ''thenbegin
                    // Determine the bin where this serial number is stored
                    // Update the "From Bin" if the bin is different than the actual bin                    
                end;
            until MobWmsRegistration.Next() = 0;
    end;

This principle can be used to handle many scenarios,Available events are:


Filter by label (Content by label)
showLabelsfalse
max90
showSpacefalse
sorttitle
titleAvailable events
cqllabel = "bc" and label = "mobregistrations " and label = "integrationevent" and label = "onbeforepost" and ancestor = "47220743"
 

See also 

Filter by label (Content by label)showLabelsfalseshowSpacefalsesorttitlereversetrueexcerptTypesimplecqllabel in ("integrationevent","example") and label = "mobregistrations"