Use this event to
Modify properties for any single header step (usually a customized step from another app)
Description
- You may use this event to change any property or e.g. the defaultValue
- This event is executed once for every Step added from
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep', '', true, true)]
local procedure OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
begin
end;
Example
//
// [Example]: Update defaultvalue for a custom header step (a step created from another app)
//
// Imitate some custom step from another app (for this example, mirror the Pack&Ship StagingHint-step
// Creating a new step should really happen in the other app and are included here for the example only.
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeader', '', true, true)]
local procedure OnGetPickOrderLines_OnAddStepsToAnyHeader(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
var
MobLanguage: Codeunit "MOB WMS Language";
begin
_StepsElement.Create_TextStep(61020, 'StagingHint');
_StepsElement.Set_header('Staging Hint');
_StepsElement.Set_label('');
_StepsElement.Set_helpLabel('Shipment area staging bin');
_StepsElement.Set_defaultValue('');
_StepsElement.Set_length(50);
_StepsElement.Set_optional(true);
end;
// Update properties for an existing header step (usually a customized step from another app)
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Pick", 'OnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep', '', true, true)]
local procedure MyOnGetPickOrderLines_OnAddStepsToAnyHeaderOnAfterAddStep(_RecRef: RecordRef; var _StepsElement: Record "MOB Steps Element")
begin
if _StepsElement.Get_name() = 'StagingHint' then begin
_StepsElement.Set_defaultValue('MyNewDefaultStagingHintValue');
_StepsElement.Save();
end;
end;
More examples
-
Case: Add Header Step to inbound goods documents (Signature Step) — The warehouse employee must sign inbound goods (signature step).
-
Case: Add Header Step to inbound goods documents (Text Step) — When receiving goods, a new text collector step must be added for the user to enter comments about goods being damaged etc.
-
Case: Show G/L Account Lines and Non-Inventory Items on Receive and Pick — This case doesn't work with Warehouse Documents, Only basic Inventory on Sales and Purchase Orders.
-
How-to: Online Validation for Line step — Online Validation on Steps can instantly validate the user data, with a call to BC.
Version History
Version | Changes |
---|---|
MOB5.34 | Introduced |