Use this event to
Add steps to be displayed at the mobile device when collecting values for output Quantity.
Description
At the mobile device Output quantity may be collected at mobile by either...
- Double-tap the Output line to collect "all steps" (Quantity-steps, but also steps related to Time and Scrap).
- Register only "Quantity"-steps by using the promoted "Output Quantity" action at the page.
This same event will add steps to both options mentioned above (on the other hand meaning: Steps cannot conditionally be added to only one of the two options).
Steps are generally sorted by Id. Existing output steps for Quantity in the Mobile WMS is numbered 10 to 60, while subsequent existing Time-steps has Step Id 100 to 110.
- ...If your new step should be displayed at the last Quantity-step, choose an Id between 70 and 99 for your step.
- ...If your new step should be the last step displayed at all, choose a high Id for your step, i.e. 10000
Due to the Production Output being implemented as Lookup-page each single Registration is posted right away (when Steps for the line is collected). For this reason no events exists to add "header" level steps.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity', '', true, true)]
local procedure OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity(var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Steps: Record "MOB Steps Element")
begin
end;
Example
// [Example] Add custom "Total NetWeight" step if item is setup for NetWeight
[EventSubscriber(ObjectType::Codeunit, Codeunit::"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")
var
Item: Record Item;
begin
if (Item.Get(_LookupResponse.Get_ItemNumber())) and (Item."Net Weight" <> 0) then begin
// create new step id 90 = following existing quantity steps, but prior to time steps
_Steps.Create_DecimalStep(90, 'CustomTotalNetWeightGrams');
_Steps.Set_header('Total Net Weight (Grams)');
_Steps.Set_label('Total Net Weight (Grams):');
_Steps.Set_helpLabel('Total Net Weight in Grams');
_Steps.Set_minValue(0);
_Steps.Set_maxValue(100000);
_Steps.Set_performCalculation(true);
end;
end;
More examples
-
Case: Add Posting Date step to Production Consumption and Output — A customer wishes to allow mobile users to specify the posting date when posting Production Consumption and Output from the mobile device.
-
How-to: Production Output - Implement a Unit of Measure step — For Items with multiple Unit of Measure codes
Version History
Version | Changes |
---|---|
MOB5.22 | Introduced |