...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Info | ||
---|---|---|
| ||
This article was written for a connector used with the separate Pack & Ship Extension (OnPrem or Per-Tenant). Mobile WMS - Implementing a new Shipping Provider Connector |
Use this event to
...
Optional: Synchronize master data for Package Stations from 3rd party Shipping App to Tasklet Pack and Ship Extension.
Description
Package
...
Stations is an optional entity in the "Pack and Ship" setup. The "Pack and Ship" solution has no functionality attached to "Packing Station"s out-of-the box and syncronizing Packing Stations is entirely optional.
A sample use can be seen in our "ShipIt365 Connector" where the "MOS Packing Station" table is extended with new fields for external user names to be sent to the "Transsmart" service used by the "IDYS ShipIt365 AppSource App". Unless you have extended the "MOS Packing Station" table with your own custom fields it will generally not be needed to syncronize master data for this table.
See also: Read master data from 3rd party Shipping App
Template
[IntegrationEvent(false, falseEventSubscriber(ObjectType::Codeunit, Codeunit::"MOS Pack API", 'OnSynchronizePackingStations', '', true, true)]
internallocal procedure OnSynchronizePackageTypes OnSynchronizePackingStations(var _PackageTypePackingStation: Record "MOS Package TypeMOS Packing Station")
begin
end;
Example
/// <summary>
/// Interface implementation: Synchronize package types from external solution to our own internal table
/// </summary>
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOS Pack API", 'OnSynchronizePackageTypesOnSynchronizePackingStations', '', true, true)]
local procedure OnSynchronizePackageTypes OnSynchronizePackingStations(var _PackageTypePackingStation: Record "MOS Package Type")
begin
SynchronizePackageTypes(_PackageType);
end; internal procedure SynchronizePackageTypes(var _PackageType: Record "MOS Package Type")
var
IdysPackageTypeMOS Packing Station")
var
IdysUserSetup: Record "IDYS Package TypeIDYS User Setup";
begin
IdysPackageType IdysUserSetup.Reset();
if IdysPackageType IdysUserSetup.FindSet() then
repeat
_PackageType.Init()PackingStation.SetRange("MOSSHIPIT User Name (External)", IdysUserSetup."User Name (External)");
if _PackageTypePackingStation.Validate(Code, '');
_PackageType.Validate("Shipping Provider Id", GetShippingProviderId());
_PackageType.Validate("Shipping Provider Package Type", IdysPackageType.Code);
_PackageType.Validate(Description, CopyStr(IdysPackageType.Description, 1, MaxStrLen(_PackageType.Description)));
_PackageType.Validate(Default, IdysPackageType.Default);
_PackageType.Validate(Unit, IdysPackageType.Type);
_PackageType.Validate(Height, IdysPackageType.Height);
_PackageType.Validate(Width, IdysPackageType.Width);
_PackageType.Validate(Length, IdysPackageType.Length);
_PackageType.Validate(Weight, IdysPackageType.Weight);
if _PackageType.Insert(true) then; // Package Type may already exist
until IdysPackageType.Next() = 0;
end;IsEmpty() then begin
_PackingStation.Init();
_PackingStation."No." := ''; // Auto-assigned in OnInsert( ) if blank.
_PackingStation.Description := IdysUserSetup."User Name (External)";
_PackingStation."MOSSHIPIT User Name (External)" := IdysUserSetup."User Name (External)";
_PackingStation.Insert(true);
end;
until IdysUserSetup.Next() = 0;
_PackingStation.Reset(); // Remove any filters
end;
tableextension 62100 "MOSSHIPIT Packing Station" extends "MOS Packing Station"
{
fields
{
field(62100; "MOSSHIPIT User Name (External)"; Text[80])
{
Caption = 'User Name (External)';
DataClassification = ToBeClassified;
}
}
}
Version History
Version | Changes |
---|---|
MOS1.0.0 | Introduced |