Versions Compared

Key

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


Info
title(Legacy) OnPrem/Per-Tenant Extension

This article was written for a connector used with the separate Pack & Ship Extension (OnPrem or Per-Tenant).
Pack & Ship is now a feature in the standard Mobile WMS (since MOB5.42) and will use a new API to connect directly to the Mobile WMS App.

Existing custom connectors can be migrated by following the guide How-to: Migration - of Pack & Ship to Mobile WMS.

Links:

Mobile WMS - Implementing a new Shipping Provider Connector
Mobile WMS - Write Transaction Data to 3rd party Shipping ProviderApp

Use this event to

Validate or update external setup tables prior to posting.

...

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOS Pack API", 'OnBeforePostPacking''', true, true)]
    local procedure OnBeforePostPacking_UpdatePackingStation(_RegistrationType: Text; _PackingStation: Record "MOS Packing Station"; var _RequestValues: Record "MOB NS Request Element")
    begin
        if _RegistrationType <> 'PostPacking' then
            exit;

        // Your custom code here...

    end;

Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOS Pack API", 'OnBeforePostPacking''', true, true)]
    local procedure OnBeforePostPacking_UpdatePackingStation(_RegistrationType: Text; _PackingStation: Record "MOS Packing Station"; var _RequestValues: Record "MOB NS Request Element")
    var
        ShipItUserSetup: Record "IDYS User Setup";
    begin
        if _RegistrationType <> 'PostPacking' then
            exit;

        If _PackingStation."No." = 0 then
            exit;

        _PackingStation.TestField("MOSSHIPIT User Name (External)");        

        if ShipItUserSetup.Get(UserIdthen begin
            ShipItUserSetup.Validate("User Name (External)", _PackingStation."MOSSHIPIT User Name (External)");
            ShipItUserSetup.Modify();
        end;
    end;

Version History

VersionChanges
MOS1.0.0Introduced

...