OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputQuantity
Use this event to
Modify properties for any single step when registering Production Output Quantity.
See also:
OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutput
OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity
Description
This event is executed once for every step added from OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutput or OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputQuantity.
You may use this event to change any property of the step or hide the step.
Template
/// <param name="_RegistrationType">'ProdOutputQuantity' = Called from Adhoc Action; 'ProdOutput' = Called from element list by clicking the element</param>
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputQuantity', '', true, true)]
local procedure OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputQuantity(_RegistrationType: Text; var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Step: Record "MOB Steps Element")
begin
end;
Example - Prevent special characters from being entered in the Lot Number and Serial Number steps (only alfa-numeric values are to be allowed)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputQuantity', '', true, true)]
local procedure MyOnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputQuantity(_RegistrationType: Text; var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Step: Record "MOB Steps Element")
begin
if _Step.Get_name() in ['SerialNumber', 'LotNumber'] then
_Step.Set_inputFormat('^\w+$'); // Regex for allowed values
end;
More examples
-
Case: Default total RunTime based on produced quantity in Production Output — A customer wants the RunTime step for Production Output to be populated with a default value.
-
How-to: Online Validation for Line step — Online Validation on Steps can instantly validate the user data, with a call to BC.
-
How-to: Online Validation for Unplanned Step — "onlineValidation" on Steps can instantly validate the entered data, with a call to the back-end
-
How-to: Production Output - Implement a Unit of Measure step — For Items with multiple Unit of Measure codes
Version History
Version | Changes |
---|---|
MOB5.39 | Introduced |