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::Codeunit, Codeunit::"MOB WMS Adhoc Registr.MOB Print", 'OnGetRegistrationConfigurationOnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate', '', true, true)]
procedure OnGetRegistrationConfiguration OnLookupOnPrintLabel_OnAfterAddStepOnAddStepsForTemplate(_RegistrationTypeTemplateName: Text[50]; _SourceRecRef: RecordRef; var _HeaderFieldValuesStep: Record "MOB NS Request ElementMOB Steps Element"; var _StepDataset: Record "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::Codeunit, Codeunit::"MOB WMS Adhoc Registr.MOB Print", 'OnGetRegistrationConfigurationOnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate', '', true, true)]
procedure MyOnGetRegistrationConfiguration OnLookupOnPrintLabel_OnAfterAddStepOnAfterAddStepForTemplate(_RegistrationTypeTemplateName: Text[50]; _SourceRecRef: RecordRef; var _HeaderFieldValuesStep: Record "MOB NS Request ElementMOB Steps Element"; var _StepDataset: Record "MOB Steps ElementMOB Common Element")
var
MobWmsToolbox Item: Codeunit "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) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5.19 | Introduced |