Info | ||
---|---|---|
| ||
This event is specific to the "PostShipment"-RegistrationType. Do not confuse with other RegistrationTypes that is posting shipmens as well and got their own events i.e. OnPostAdhocRegistrationOnToteShipping_OnBeforeModifyWarehouseShipmentHeaderOnBeforeRunWhsePostShipment |
Use this event to
Excerpt |
---|
Code to be executed prior to posting via standard posting routinesroutine for RegistratonType "PostShipment". |
Description
The event can be used to call functions on the standard posting codeunit before run to i.e. print document on posting.
...
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeaderOnBeforeRunWhsePostShipment', '', true, true)]
local procedure OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeaderOnBeforeRunWhsePostShipment(var _RequestValuesWhseShptLine: Record "MOB NS Request ElementWarehouse Shipment Line"; var _WhseShptHeaderWhsePostShipment: RecordCodeunit "Warehouse Shipment HeaderWhse.-Post Shipment")
begin
end;
Example
// [Example]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeaderOnBeforeRunWhsePostShipment', '', true, true)]
local procedure MyOnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeaderOnBeforeRunWhsePostShipment(var _RequestValuesWhseShptLine: Record "MOB NS Request ElementWarehouse Shipment Line"; var _WhseShptHeaderWhsePostShipment: RecordCodeunit "Warehouse Shipment Header")
var
ShippingAgentCode: Code[10];
ShippingAgentServiceCode: Code[10];
begin
// prerequisite: the "ShippingAgentCode"- and "ShippingAgentServiceCode"-steps must to be created from separate event to be able to actually read this value here
// see: https://docs.taskletfactory.com/display/TFSK/OnGetRegistrationConfiguration_OnAddSteps
ShippingAgentCode := CopyStr(_RequestValues.GetValue('ShippingAgentCode'), 1, MaxStrLen(ShippingAgentCode));
ShippingAgentServiceCode := CopyStr(_RequestValues.GetValue('ShippingAgentServiceCode'), 1, MaxStrLen(ShippingAgentServiceCode));
_WhseShptHeader.Validate("Shipping Agent Code", ShippingAgentCode);
_WhseShptHeader.Validate("Shipping Agent Service Code", ShippingAgentServiceCodeWhse.-Post Shipment")
begin
_WhsePostShipment.SetPrint(true);
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Version History
Version | Changes |
---|---|
MOB5.17 | Introduced |