Info | ||
---|---|---|
| ||
This event is specific to the "PostShipment"-RegistrationType. Do not confuse with other RegistrationTypes that is posting shipments.as well and got their own events i.e. OnPostAdhocRegistrationOnToteShipping_OnBeforeModifyWarehouseShipmentHeader |
...
// [Template]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnToteShippingOnPostAdhocRegistrationOnPostShipment_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader', '', true, true)]
local procedure OnPostAdhocRegistrationOnToteShipping OnPostAdhocRegistrationOnPostShipment_OnHandleRegistrationForWarehouseShipmentLine(var _Registration: Record "MOB WMS Registration"; OnBeforeModifyWarehouseShipmentHeader(var _RequestValues: Record "MOB NS Request Element"; var _WhseShptLineWhseShptHeader: Record "Warehouse Shipment LineWarehouse Shipment Header")
begin
end;
Example
// [Example]
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnToteShippingOnPostAdhocRegistrationOnPostShipment_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader', '', true, true)]
local procedure MyOnPostAdhocRegistrationOnToteShipping MyOnPostAdhocRegistrationOnPostShipment_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader(var _Registration: Record "MOB WMS Registration"; var _RequestValues: Record "MOB NS Request Element"; var _WhseShptLineWhseShptHeader: Record "Warehouse Shipment LineWarehouse Shipment Header")
var
WhseShptHeader ShippingAgentCode: Record "Warehouse Shipment Header"Code[10];
RegistrationType ShippingAgentServiceCode: TextCode[10];
begin
RegistrationType
// 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('RegistrationTypeShippingAgentCode');
WhseShptHeader.Get(_WhseShptLine."No.");
_WhseShptLine."Description 2", 1, MaxStrLen(ShippingAgentCode));
ShippingAgentServiceCode := CopyStr(StrSubstNo_RequestValues.GetValue('%1 %2 %3ShippingAgentServiceCode'), RegistrationType, _Registration."Tote ID", WhseShptHeader."MOB Posting MessageId"), 1, MaxStrLen(_WhseShptLine."Description 2")) 1, MaxStrLen(ShippingAgentServiceCode));
_WhseShptHeader.Validate("Shipping Agent Code", ShippingAgentCode);
_WhseShptHeader.Validate("Shipping Agent Service Code", ShippingAgentServiceCode);
end;
Filter by label (Content by label) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...