Use this event to
...
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) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...