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.

Links:

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

Use this event to

...

Validate untransferred License Plates prior to creating transactions in 3rd party Shipping App


Description

Use this event to validate untransferred License Plates (transaction data) stored in internal "Pack and Ship" tables prior to writing transaction data to the 3rd party Shipping App.

See also: Pack & Ship Extension - Write transaction data to 3rd party Shipping App


Template

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOS Pack API", 'OnPostPackingOnCheckUntransferredLicensePlate''', true, true)]
    local procedure OnPostPackingOnCheckUntransferredLicensePlate(_LicensePlate: Record "MOS License Plate")
    begin
    end;

Example

    [EventSubscriber(ObjectType::CodeunitCodeunit::"MOS Pack API", 'OnPostPackingOnCheckUntransferredLicensePlate''', true, true)]
    local procedure OnPostPackingOnCheckUntransferredLicensePlate(_LicensePlate: Record "MOS License Plate")
    var
        IdysSetup: Record "IDYS Setup";
        IdysPackageType: Record "IDYS Package Type";
        PackageType: Record "MOS Package Type";
    begin
        if not IsShippingProvider(_LicensePlate."Package Type"then
            exit;

        // Check PackageType exists in IDYS and will not error out during validation        
        PackageType.Get(_LicensePlate."Package Type");
        IdysPackageType.Get(PackageType."Shipping Provider Package Type");

        // Check we are indeed supposed to create Transport Order from our code
        IdysSetup.Get();
        IdysSetup.TestField("After Posting Sales Orders", IdysSetup."After Posting Sales Orders"::"Do nothing");    // TODO - baseres på LicensePlate.Source Type og/eller Whse. Document Type
    end;

    /// <summary>
    /// Is the package type handled by the current Shipping Provider Id
    /// </summary>   
    local procedure IsShippingProvider(_PackageType: Code[20])Boolean
    var
        PackageType: Record "MOS Package Type";
    begin
        exit(PackageType.Get(_PackageType) and (PackageType."Shipping Provider Id" = GetShippingProviderId()));
    end;

Version History

VersionChanges
MOS1.0.0Introduced

...