Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Use this event to

TODO

Description

TODO

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputTime''', true, true)]
    local procedure OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputTime(var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Steps: Record "MOB Steps Element")
    begin
    end;

Example

    // [Example]  Add custom "StopCode" step if RunTime step is to be registered
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputTime''', true, true)]
    local procedure MyOnGetRegistrationConfigurationOnProdOutput_OnAddStepsToProductionOutputTime(var _LookupResponse: Record "MOB NS WhseInquery Element"; var _Steps: Record "MOB Steps Element")
    var
        RegisterRunTime: Boolean;
        ListValues: Text;
        DefaultValue: Text;
    begin
        Evaluate(RegisterRunTime, _LookupResponse.GetValue('RegisterRunTime', true));
        if RegisterRunTime then begin
            // demo dropdown options - could be built from database table but standard w1 demo data includes no Stop Codes
            ListValues := ';Stuck/Jammed;In repair;Out of materials';
            DefaultValue := 'Out of materials';

            // create new step id 190 = following existing time steps, but prior to scrap steps
            _Steps.Create_ListStepFromListValues(
                190,                        // Id
                'CustomStopCode',           // name
                'Stop Code',                // header
                '',                         // label
                '',                         // helpLabel
                ListValues,
                DefaultValue);
            _Steps.Save();
        end;
    end;



More examples

  

Version History

VersionChanges
MOB5.22Introduced
  • No labels