OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputScrap

Use this event to

Modify properties for any single step when registering Production Output Scrap.


See also:

OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutput

OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputScrap


Description

This event is executed once for every step added from OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutput or OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputScrap.

You may use this event to change any property of the step or hide the step.

Template

    /// <param name="_RegistrationType">'ProdOutputScrap' = Called from Adhoc Action; 'ProdOutput' = Called from element list by clicking the element</param>
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputScrap', '', true, true)]
    local procedure OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputScrap(_RegistrationType: Text; var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Step: Record "MOB Steps Element")
    begin
    end;


Example - Hide all scrap steps when called from elements list by clicking the element (but must still be visible when called from Adhoc Action)

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputScrap', '', true, true)]
    local procedure MyOnGetRegistrationConfigurationOnProdOutput_OnAfterAddStepToProductionOutputScrap(_RegistrationType: Text; var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Step: Record "MOB Steps Element")
    var
        MobWmsToolbox: Codeunit "MOB WMS Toolbox";
    begin
        if _RegistrationType = MobWmsToolbox."CONST::ProdOutput"() then
            _Step.Set_Visible(false);
    end;


More examples


Version History

VersionChanges
MOB5.39Introduced