Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Typo

Use this event to

Excerpt

Create steps for existing and new Unplanned Functions.

...

Template

...

Use this event to

Excerpt

Create steps for existing and new Unplanned Functions.



See also: 
OnGetRegistrationConfiguration_OnAfterAddStep

Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddSteps''', true, true)]
    local procedure OnGetRegistrationConfiguration_OnAddSteps(_RegistrationType: Textvar _HeaderFieldValues: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps Element"; var _RegistrationTypeTracking: Text)
    begin
    end;


Example

    // [Example] Get RegistrationConfiguration for RegistrationType=ItemDimensions, add additional step for Cubage=ItemDimensions, add an additional step for collecting Cubage (default behavior is calculating Cubage based on Height*Width*Length)
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddSteps''', true, true)]
    local procedure MyOnGetRegistrationConfiguration_OnAddSteps(_RegistrationType: Textvar _HeaderFieldValues: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps Element"; var _RegistrationTypeTracking: Text)
    var
        ItemUoM: Record "Item Unit of Measure";
        MobToolbox: Codeunit "MOB Toolbox";
        MobWmsLanguage: Codeunit "MOB WMS Language";
        MobWmsToolbox: Codeunit "MOB WMS Toolbox";
        MobItemReferenceMgt: Codeunit "MOB Item Reference Mgt.";
        ItemNo: Code[20];
        VariantCode: Code[10];
        UnitOfMeasureCode: Code[10];
        UoMExists: Boolean;
    begin
        if _RegistrationType = MobWmsToolbox."CONST::ItemDimensions"() then begin
            ItemNo() then begin
            ItemNo := MobItemReferenceMgt.SearchItemReference(CopyStr(MobToolbox.ReadEAN(_HeaderFieldValues.GetValue('ItemNumber'))150), VariantCode);
            UnitOfMeasureCode := MobWmsToolbox.SearchItemCrossRef(CopyStr(MobToolbox.ReadEAN(_HeaderFieldValues.GetValue('ItemNumberUnitOfMeasure'))120), VariantCode10);

            ItemUoM.Reset();
            ItemUoM.SetRange("Item No.", ItemNo);
            ItemUoM.SetRange(Code, UnitOfMeasureCode);
            UnitOfMeasureCode            UoMExists := CopyStr(_HeaderFieldValues.GetValue('UnitOfMeasure')110);            ItemUoM.Reset();
            ItemUoM.SetRange("Item No.", ItemNo);
            ItemUoM.SetRange(Code, UnitOfMeasureCode);
            UoMExists := ItemUoM.FindFirst();
            with _Steps do begin
                ItemUoM.FindFirst();

            // STEP: Information step including html (html is supported for InformationStep helpLabel and Whse. Lookup-responses)
            _Steps.Create_InformationStep(50'Information');
            _Steps.Set_header('New dimension');
            _Steps.Set_helpLabel(MobWmsLanguage.GetMessage('ENTER_CUBAGE'' <b><font color="red">in m3</font></b>');

            // STEP: Cubage (from 'Quantity' Template)
                Create            _Steps.Create_DecimalStep_Quantity(5055, ItemNo);
                Set            _Steps.Set_name('Cubage');
                Set            _Steps.Set_header(MobWmsLanguage.GetMessage('ENTER_CUBAGE'));
                Set            _Steps.Set_label(MobWmsLanguage.GetMessage('CUBAGE_LABEL'':');
                Set            _Steps.Set_eanAI('');
                            if UoMExists then
                    Set                _Steps.Set_defaultValue(ItemUoM.Cubage);
                Set            _Steps.Set_minValue(0);
            end;
        end;
    end;

 

Image Added

Image Added



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


Version History

...