Suggest a new LotNumber from associated "Lot No.s" number series for output item


When an output item is setup for production output lot numbers there will generally be two ways to have the lot number assigned during posting:

  • Print labels for the production output item including new lot numbers pulled from the Number Series. Scan these labels during Production Output on the mobile device to populate the Lot Number step.  Such "lot labels" is currently not included in standard Mobile WMS and may need to be a new customizaton as well.
  • Suggest Lot Numbers from a number series as defaultvalue for the Lot Number step during Production Output on the mobile device. No label including the lot number is applied to the output items.

An example of the latter approach is below.

Note: Currently no event is available in Mobile WMS to edit standard Mobile WMS production output steps.  A not-so-pretty workaround in the example is reusing an event intended for creating new steps. New evenrts to update standard production output steps will be included in an upcoming version of Mobile WMS.


    // [Example]  Assign LotNumber from Number Series on production output posting
    // Workaround: Currently no event is available to edit standard Mobile WMS production output steps -> reusing an event intended for creating new steps
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity''', true, true)]
    local procedure MyOnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity(var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Steps: Record "MOB Steps Element")
        Item: Record Item;
        ItemTrackingCode: Record "Item Tracking Code";
        NoSeriesManagement: Codeunit NoSeriesManagement;
        NextLotNumber: Code[50];
        if not Item.Get(_LookupResponse.Get_ItemNumber()) then

        if (Item."Item Tracking Code" = '') or (Item."Lot Nos." = ''then

        if not ItemTrackingCode.Get(Item."Item Tracking Code"then

        if not ItemTrackingCode."Lot Manuf. Outbound Tracking" then

        NextLotNumber := NoSeriesManagement.GetNextNo(Item."Lot Nos.", WorkDate(), true);

        // Since this is really an event to add new steps for another step, save that step before switching to the one we want to update

        _Steps.SetRange(name, 'LotNumber');
        _Steps.Set_defaultValue(NextLotNumber)// Assign from number series here