Use this event to
...
- Double-tap the Output line to collect "all steps" (for Quantity-steps, but also steps related to Time and AND Scrap).
- Register Collect only "Quantity"-steps by using the promoted "Output Quantity" action at the page.
...
[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;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...