...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Description
Excerpt |
---|
Fix registrations received from the mobile device before processing them |
...
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 OnPostPickOrder_OnBeforePostWarehouseActivityOrder
Use case
In the picking scenario, the user typically scans both the Bin 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.
...
This way we can allow the user to just scan the serial numbers and handle the "From Bins" in the background.
Technical Background Details
Every time mobile 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 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, you can subscribe to xxx_OnBeforePostYYY -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) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
See also
Filter by label (Content by label)