...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
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
...
Validate or update external setup tables prior to posting.
Description
You may use this event to validate or update setup values in the 3rd party Shipping App prior to posting. Transactional data is better handled in the OnPostPackingOnBeforePostWarehouseShipment event.
Each 3rd party Shipping App being integrated into "Tasklet Pack and Ship" must provide a unique "Shipping Provider Id" identifying this exact "ShippingProvider" Connector App integration.
The "Shipping Provider Id" is used to separate imported master data from various 3rd party Shipping Apps that may otherwise use conflicting codes (i.e. two implementations both using Package Type = 'BOX').
Tasklet are using Id's "SHIPIT365" and "LOGTRADE" for its two out-of-the-box ShippingProvider implementations.
...
A sample use can be seen in our "ShipIt365 Connector" where external user names and passwords for the "Transsmart" service (used by the "IDYS ShipIt365 AppSource App") is updated based on which Packing Station was used for the handling.
Note: Transactional data (License Plates and Transport Orders) are better handled in the Pack & Ship Extension - OnPostPackingOnBeforePostWarehouseShipment (MOS) and Pack & Ship Extension - OnPostPackingOnAfterPostWarehouseShipment (MOS) events.
See also: Pack & Ship Extension - Write transaction data to 3rd party Shipping App
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOS Pack API", 'OnDiscoverShippingProviderOnBeforePostPacking', '', true, true)]
local procedure OnDiscoverShippingProvider( 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::Codeunit, Codeunit::"MOS Pack API", 'OnDiscoverShippingProviderOnBeforePostPacking', '', true, true)]
local procedure OnDiscoverShippingProvider( OnBeforePostPacking_UpdatePackingStation(_RegistrationType: Text; _PackingStation: Record "MOS Packing Station"; var _RequestValues: Record "MOB NS Request Element")
var
MosPackAPI ShipItUserSetup: CodeunitRecord "MOS Pack APIIDYS User Setup";
begin
MosPackAPI.SetupShippingProvider(GetShippingProviderId(), 'My custom ShippingProvider Connector App');
end; local procedure GetShippingProviderId(): Code[20]
begin
exit('MYSHIPPINGPROVIDERID') if _RegistrationType <> 'PostPacking' then
exit;
If _PackingStation."No." = 0 then
exit;
_PackingStation.TestField("MOSSHIPIT User Name (External)");
if ShipItUserSetup.Get(UserId) then begin
ShipItUserSetup.Validate("User Name (External)", _PackingStation."MOSSHIPIT User Name (External)");
ShipItUserSetup.Modify();
end;
end;
Version History
Version | Changes |
---|---|
MOS1.0.0 | Introduced |