Use this event to
Excerpt |
---|
Create new steps for existing and new Modify properties for any single step for Adhoc RegistrationTypes. |
See also:
OnGetRegistrationConfiguration_OnAfterAddStep
OnGetRegistrationConfigurationOnCustomRegistrationType_OnAddStepsAsXml
Description
This event is executed once for every step added from standard Adhoc DocumentTypes as well as custom Adhoc DocumentTypes.
You may use this event to change any property of the step, or hide the step.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddSteps', '', true, true)]
procedure OnGetRegistrationConfiguration_OnAddSteps(_RegistrationType: Text; var _HeaderFilter: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps Element"; var _RegistrationTypeTracking: Text[200])
begin
end;
Example
// Get RegistrationConfiguration for RegistrationType=ItemDimensions, add additional step for Cubage
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnGetRegistrationConfiguration_OnAddSteps', '', true, true)]
procedure MyOnGetRegistrationConfiguration_OnAddSteps(_RegistrationType: Text; var _HeaderFilter: Record "MOB NS Request Element"; var _Steps: Record "MOB Steps Element"; var _RegistrationTypeTracking: Text[200])
var
ItemUoM: Record "Item Unit of Measure";
MobToolbox: Codeunit "MOB Toolbox";
MobWmsLanguage: Codeunit "MOB WMS Language";
MobWmsToolbox: Codeunit "MOB WMS Toolbox";
ItemNo: Code[20];
VariantCode: Code[10];
UnitOfMeasureCode: Code[10];
UoMExists: Boolean;
begin
if _RegistrationType = MobWmsToolbox."CONST::ItemDimensions"() then begin
ItemNo := MobWmsToolbox.SearchItemCrossRef(CopyStr(MobToolbox.ReadEAN(_HeaderFilter.GetValue('ItemNumber')), 1, 20), VariantCode);
UnitOfMeasureCode := CopyStr(_HeaderFilter.GetValue('UnitOfMeasure'), 1, 10);
ItemUoM.Reset();
ItemUoM.SetRange("Item No.", ItemNo);
ItemUoM.SetRange(Code, UnitOfMeasureCode);
UoMExists := ItemUoM.FindFirst();
with _Steps do begin
// STEP: Cubage
Create_QuantityStep(50, ItemNo);
Set_name('Cubage');
Set_header(MobWmsLanguage.GetMessage('ENTER_CUBAGE'));
Set_label(MobWmsLanguage.GetMessage('CUBAGE_LABEL') + ':');
Set_eanAI('');
if UoMExists then
Set_defaultValue(ItemUoM.Cubage);
Set_minValue(0);
end;
end;
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...