Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

...

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


Template

        [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddStepsOnAfterAddStep''', true, true)]
    procedure OnGetRegistrationConfiguration_OnAddStepsOnAfterAddStep(_RegistrationType: Textvar _HeaderFilter: Record "MOB NS Request Element"; var _StepsStepRecord "MOB Steps Element"var _RegistrationTypeTracking: Text[200])
    begin
    end;


Example

    // Get RegistrationConfiguration for RegistrationType=ItemDimensions , add  additional step for Cubage– hide Length, Width and Height steps

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddStepsOnAfterAddStep''', true, true)]
    procedure MyOnGetRegistrationConfiguration_OnAddStepsOnAfterAddStep(_RegistrationType: Textvar _HeaderFilter: Record "MOB NS Request Element"; var _StepsStepRecord "MOB Steps Element"var _RegistrationTypeTracking: Text[200])
    varbegin
        ItemUoM: Record "Item Unit of Measure";
        MobToolbox: Codeunit "MOB Toolbox";
        MobWmsLanguage: Codeunit "MOB WMS Language";
        MobWmsToolbox: Codeunit "MOB WMS Toolbox";
        ItemNo: Code[20];
        VariantCode: Code[10];
        UnitOfMeasureCode: Code[10];
        UoMExists: Boolean;
    begin
        if _RegistrationType = MobWmsToolbox."CONST::ItemDimensions"() then begin
            ItemNo := MobWmsToolbox.SearchItemCrossRef(CopyStr(MobToolbox.ReadEAN(_HeaderFilter.GetValue('ItemNumber'))120), VariantCode);
            UnitOfMeasureCode := CopyStr(_HeaderFilter.GetValue('UnitOfMeasure')110);            ItemUoM.Reset();
            ItemUoM.SetRange("Item No.", ItemNo);
            ItemUoM.SetRange(Code, UnitOfMeasureCode);
            UoMExists := ItemUoM.FindFirst();
            with _Steps do begin
                // STEP: Cubage
                Create_QuantityStep(50, ItemNo);
                Set_name('Cubage');
                Set_header(MobWmsLanguage.GetMessage('ENTER_CUBAGE'));
                Set_label(MobWmsLanguage.GetMessage('CUBAGE_LABEL'':');
                Set_eanAI('');
                if UoMExists then
                    Set_defaultValue(ItemUoM.Cubage);
                Set_minValue(0);
            end;
        end        with _Step do
            if Get_name() in ['Length''Width''Height'then
                Set_visible(false);
    end;




Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "example"

...