OnLookupOnPrintLabel_OnAfterAddStepForTemplate
Use this event to
Modify existing steps properties on a label template
See also:
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::Codeunit, Codeunit::"MOB Print", 'OnLookupOnPrintLabel_OnAfterAddStepForTemplate', '', true, true)]
procedure OnLookupOnPrintLabel_OnAddStepsForTemplate(_TemplateName: Text[50]; _SourceRecRef: RecordRef; var _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::Codeunit, Codeunit::"MOB Print", 'OnLookupOnPrintLabel_OnAfterAddStepForTemplate', '', true, true)]
procedure OnLookupOnPrintLabel_OnAfterAddStepForTemplate(_TemplateName: Text[50]; _SourceRecRef: RecordRef; var _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;
More examples
-
(Legacy) Case: Print muliple labels with unique lot numbers (MOB5.23-MOB5.38) — Option to generate and print multiple unique labels
-
Case: Print Customized License Plate Contents label (Cloud Print) — Modify the column and lines on License Plate Contents.
-
Case: Print Label on Planned Function Posting (Cloud Print) — Print Label on Planned Posting, i.e. Receive, Pick, Put-away, Ship, Move etc.
-
Case: Print Label on Tote Shipping Posting (Cloud Print) — Print Label on the posting of Tote Shipping.
-
Case: Print muliple labels with unique lot numbers (Cloud Print) — Option to generate and print multiple unique labels
-
Case: Print your own ZPL labels (Cloud Print) — Print your own ZPL labels
-
Cloud Print: How to Copy a Label-Template to New — In this video, we will make a copy an existing label-template
-
Cloud Print: How to modify label-template — In this video, you will be introduced to modify the design of a label-template, using the designer.
-
Cloud Print: How to modify label-template and add data — In this video, you will be introduced to modifying the design of a label template, using the designer, and adding data using AL code.
-
How-to: Add data to label-template (Cloud Print) — You want to modify a label template by adding data to it
-
How-to: Add new/Copy a label-template (Cloud Print) — You want to add/create a custom label template with a unique design
-
How-to: Modify steps on a label-template (Cloud Print) — Modify collected steps before a Label-template is printed.
Version History
Version | Changes |
---|---|
MOB5.19 | Introduced |