Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Use this event to

Excerpt

Populate fields at Warehouse Shipment Header when posting ToteShipping.


Template

        //   [Template]
        [EventSubscriber(ObjectType::Codeunit,   Codeunit::"MOB WMS Adhoc RegistrMOB WMS Adhoc Registr.",  'OnPostAdhocRegistrationOnToteShipping_
OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader',   '',  truetrue,  truetrue)]
        local procedure OnPostAdhocRegistrationOnToteShipping OnPostAdhocRegistrationOnToteShipping_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader(var  _RegistrationRequestValues:  Record  "MOB WMS RegistrationMOB NS Request Element";  var  _RequestValues: Record "MOB NS Request Element"; var _WhseShptLine: Record "Warehouse Shipment Line")
    begin
    end;
 

Example

    // [Example] 
    ToteFilter: Text; var _WhseShptHeader: Record "Warehouse Shipment Header")
    begin
    end;
 

Example

For you to read step values "ShippingAgentCode" and "ShippingAgentServiceCode" you must first create these steps: See OnGetRegistrationConfiguration_OnAddSteps


    // [Example]
    [EventSubscriber(ObjectType::Codeunit,  Codeunit::"MOB WMS Adhoc RegistrMOB WMS Adhoc Registr.",  'OnPostAdhocRegistrationOnToteShipping_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader',  '',  truetrue,  truetrue)]
        local procedure MyOnPostAdhocRegistrationOnToteShipping MyOnPostAdhocRegistrationOnToteShipping_OnHandleRegistrationForWarehouseShipmentLineOnBeforeModifyWarehouseShipmentHeader(var  _RegistrationRequestValues:  Record  "MOB WMS RegistrationMOB NS Request Element";  var  _RequestValues: Record "MOB NS Request Element"; var _WhseShptLine: Record "Warehouse Shipment Line")
    var
        WhseShptHeader: Record "Warehouse Shipment Header";
        RegistrationType: Text;
    begin
        RegistrationType := ToteFilter: Text; var _WhseShptHeader: Record "Warehouse Shipment Header")
    var
        ShippingAgentCode: Code[10];
        ShippingAgentServiceCode: Code[10];
    begin
   
        ShippingAgentCode := CopyStr(_RequestValues.GetValue('RegistrationTypeShippingAgentCode');
        WhseShptHeader.Get(_WhseShptLine."No.");
        _WhseShptLine."Description 2" := CopyStr(StrSubstNo('%1 %2 %3', RegistrationType, _Registration."Tote ID", WhseShptHeader."MOB Posting MessageId")1, MaxStrLen(_WhseShptLine."Description 2"));
    end;

...

, 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;


Filter by label (Content by label)
showLabelsfalse
showSpacefalse
sorttitle
titleMore examples
excerptTypesimple
cqllabel = "bc" and label = "example" and label = "OnPostAdhocRegistrationOnToteShipping_OnBeforeModifyWarehouseShipmentHeader"


Version History

Version

Changes

MOB5.17Introduced