PreShip |
This topic describes the ShipExec Client Pre-Ship Business Rule
A business rule hook that fires before the Ship event
this.PreShip = function(shipmentRequest, userParams) { //Example of a rule to prohibit shipment of packages greater than 75 pounds for (var index = 0; index < shipmentRequest.Packages.length; ++index) { if (shipmentRequest.Packages[index].Weight.Amount > 75) throw new Error("Package # " + (index + 1) + " is over allowable weight"); } }