If you have been using Shipping Agent Integration for a while, you may find that the Consignments and the related Message Requests and Response file start to take up lots of space in your database.
To deal with this, we have introduced some additional functionality which allows you to periodically delete Consignments and the related Message Requests and Message Response files using the Job Queue Functionality.
To set this up, you will firstly need to go the Shipping Agent Integration Setup Page and select Actions > Job Queue Settings.
On the Job Queue Settings Page, you will need to complete the Fields based on your requirements.
In this field, you will need to enter in the period that you would like to retain the Consignment Entries for using the standard Business Central Date Formulas.
For example, if you enter in 1Y then you are saying you want to keep the Consignment Entries for the last year but anything older than that can be deleted.
|Delete Selected Consignments||
In this section, you can select a specific Status of Consignment Document you want to delete where required. The options to select from are Open, Submitted, Deleted or Error.
In this section, you can select specific Shipping Agents to be included by ticking the Include in Clean Up Field against them or you can leave all the Fields blank to include all Shipping Agents.
Once all the setup has been completed, you will then need to create a Job Queue Entry to run periodically. You should use Codeunit 9094671 (Delete Consignment Rec CSAITMN) against the entry. When it is run, it will use the options selected in the Job Queue Settings in order to find the Consignment Entries to delete.