Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Current »

Note

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

Use this event to

Populate fields at Warehouse Shipment Header when posting RegistratonType "PostShipment".

Template

    // [Template]
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeader''', true, true)]
    local procedure OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeader(var _RequestValues: Record "MOB NS Request Element"; var _WhseShptHeader: Record "Warehouse Shipment Header")
    begin
    end;
 

Example

    // [Example] 
    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOB WMS Adhoc Registr.", 'OnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeader''', true, true)]
    local procedure MyOnPostAdhocRegistrationOnPostShipment_OnBeforeModifyWarehouseShipmentHeader(var _RequestValues: Record "MOB NS Request Element"; var _WhseShptHeader: Record "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", ShippingAgentServiceCode);
    end;

 

More examples

There are no items with the selected labels at this time.


Version History

Version

Changes

MOB5.17Introduced
  • No labels