Versions Compared

Key

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

Use this event to

Excerpt

Modify properties for any single step for that was added to print label templates.existing steps properties on a label template



See also: OnGetRegistrationConfiguration_OnAddSteps

Standard Label Template Designs

OnLookupOnPrintLabel_OnAddStepsForTemplate


Description

This event is executed once for every step added from standard Print Label as custom Print Label steps.

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


Template

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.MOB Print", 'OnGetRegistrationConfigurationOnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate''', true, true)]
    procedure OnGetRegistrationConfiguration OnLookupOnPrintLabel_OnAfterAddStepOnAddStepsForTemplate(_RegistrationTypeTemplateNameText[50]_SourceRecRef: RecordRefvar _HeaderFieldValuesStepRecord "MOB NS Request ElementMOB Steps Element"; var _StepDatasetRecord "MOB Steps ElementMOB Common Element")
    begin
    end;


Example

    // Get RegistrationConfiguration for RegistrationType=ItemDimensions – hide Length, Width and Height steps [Example] Change an existing step : Add item description to existing InfoStep helpLabel
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.MOB Print", 'OnGetRegistrationConfigurationOnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate''', true, true)]
    procedure MyOnGetRegistrationConfiguration OnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate(_RegistrationTypeTemplateNameText[50]_SourceRecRef: RecordRefvar _HeaderFieldValuesStepRecord "MOB NS Request ElementMOB Steps Element"; var _StepDatasetRecord "MOB Steps ElementMOB Common Element")
    var
        MobWmsToolbox        ItemCodeunit "MOB WMS Toolbox"Record Item;
        NewHelpLabel: Text;
    begin
        // Making sure we only handle our own Label-Template and intended step
        if _RegistrationType <> MobWmsToolbox."CONST::ItemDimensions"((_TemplateName <> 'My custom Label-Template'then
            exit;


        if _Step.Get_name() =    with _Step do'InfoStep' then
            if Get_name() in ['Length''Width''Height'then
                Set_visible(false);
 Item.Get(_Dataset.GetValue('ItemNo')) then begin
                NewHelpLabel := _Step.Get_helpLabel() ' ' + Item.Description;
                _Step.Set_helpLabel(NewHelpLabel);
            end;
    end;



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


Version History

VersionChanges
MOB5.19Introduced