A quick code snippet for you today, if you want to cancel all UPS shipments that have not been picked up.
Here is the code to run in Developer Console:
Line 4 determines the shipments we want to set as cancelled. For this snippet we have decided to cancel all shipments older than UPS-Shipment-0000001000.
Line 7 then uses our startMassShipmentCancelBatch process that goes ...Continue reading »