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: 

Standard Label Template Designs

OnLookupOnPrintLabel_OnAddStepsForTemplate

...

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Print", 'OnLookupOnPrintLabel_OnAfterAddStepForTemplate''', true, true)]
    procedure OnLookupOnPrintLabel_OnAddStepsForTemplate(_TemplateName: Text[50]; _SourceRecRef: RecordRefvar _Step: Record "MOB Steps Element"; var _Dataset: Record "MOB Common Element")
    begin
    end;


Example

    // [Example] Change an existing step : Add item description to existing InfoStep helpLabel
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB Print", 'OnLookupOnPrintLabel_OnAfterAddStepForTemplate''', true, true)]
    procedure OnLookupOnPrintLabel_OnAfterAddStepForTemplate(_TemplateName: Text[50]; _SourceRecRef: RecordRefvar _Step: Record "MOB Steps Element"; var _Dataset: Record "MOB Common Element")
    var
        Item: Record Item;
        NewHelpLabel: Text;
    begin
        // Making sure we only handle our own Label-Template and intended step
        if (_TemplateName <> 'My custom Label-Template'then
            exit;


        if _Step.Get_name() 'InfoStep' then
            if 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

...