Versions Compared

Key

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


Info
iconfalse

This article requires Mobile WMS extension version ...

Case

Excerpt
A customer wishes to start using there own Barcode table when scanning Items.

Proposed solution

The customer is using Warehouse Receipts for inbound goods always. Two new Decimal collector steps must be added for the user to enter NetWeight and GrossWeight for the item.  
The customization is to be used only for a limited time, and should be isolated / easy to remove later.

Save collected NetWeight/GrossWeight values to new fields at Warehouse Receipt Lines. Then, move the values to Item Card during standard BC posting to ensure changes to Item Card is written within correct scope (same COMMIT as Warehouse Receipt Line posting).

Standard CRONUS Location 'WHITE' can be used for testing the customization.

To implement using your own custom barcode table instead of using the standard Cross Reference table or Item Reference table (BC17) you should use these two Events.

First you override the GetBarcodeList to collect your own barcodes and then apply you own logic to lookup the Item reference in your own custom barcode table.

Example Code

Apply values from your own

Barcode

barcode table when returning the list of available barcodes to the mobile device.

Using event MobItemReferenceMgt - OnAfterGetBarcodeList   ( before vs after )


    // [Example]: Add Item Identifiers to _BarcodeList
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeGetBarcodeList''', true, true)]
    local procedure MyOnBeforeGetBarcodeList(_ItemNo: Code[20]; _VariantCode: Code[10]; var _BarcodeListToReturn: Textvar _IsHandled: Boolean)
    var
        ItemIdentifier: Record "Item Identifier";
    begin
        // Intentionally do not exit here if _IsHandled but always add ItemIdentifiers to BarcodeList

        ItemIdentifier.SetRange("Item No.", _ItemNo);
        ItemIdentifier.SetRange("Variant Code", _VariantCode);
        if ItemIdentifier.FindSet() then
            repeat
                if _BarcodeListToReturn = '' then
                    _BarcodeListToReturn := ItemIdentifier.Code
                else
                    _BarcodeListToReturn += ';' + ItemIdentifier.Code;
            until ItemIdentifier.Next() 0;

        _IsHandled := true;
    end;

Handle the search for an Item in your own Barcode table

Using event MobItemCrossReferenceMgt - OnBeforeSearchItemCrossRef


    // [Example]: If Item is found by filtering on ItemIdentifiers then do not search through Item References
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Item Reference Mgt.", 'OnBeforeSearchItemReference''', true, true)]
    local procedure MyOnBeforeSearchItemReference(_ScannedBarcode: Code[50]; var _ReturnItemNo: Code[20]; var _ReturnVariantCode: Code[10]; var _IsHandled: Boolean)
    var
        ItemIdentifier: Record "Item Identifier";
    begin
        ItemIdentifier.SetRange(code, _ScannedBarcode);
        if ItemIdentifier.Findfirst() then begin
            _ReturnItemNo := ItemIdentifier."Item No.";
            _IsHandled := true;
        end;
    end;

Test your solution

  • Add your own Custom Barcodes to an Item.
  • Open "Locate Item" on the mobile device and scan your custom barcode. Now you should see your Item is selected based on the scanned custom Barcode.
  • Create a Pick including you item with the custom Barcode added.
  • Select the Pick on the mobile device and scan your custom barcode. Now you should see the pickline containing your item with the custome custom Barcode selected.

Version History

VersionChanges

Initial version