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 12 Next »

System requirements

  • Business Central 17 (or newer)
  • Mobile WMS extension v5.24 (or newer)

Case

A customer wishes to start using there own Item barcode table when scanning Items on the mobile device.

Proposed solution

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

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

Step 1: Apply values from your own Item barcode table when returning the list of available item barcodes to the mobile device.

Using event MobItemReferenceMgt - OnBeforeGetBarcodeList


    // [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;

Step 2: Handle the search for an Item in your own Item barcode table

Using event MobItemReferenceMgt - OnBeforeSearchItemReference


    // [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 Item barcodes to an Item.
  • Open "Locate Item" on the mobile device and scan your custom Item barcode. Now you should see your Item is found based on the scanned value.
  • Create a Pick including you Item with the custom Item barcode added.
  • Select the Pick on the mobile device and scan your custom Item barcode. Now you should see the pickline containing your item with the custom Item barcode selected.

Version History

VersionChanges


  • No labels