Table of Contents

Scheduled consignment status updates

When status for consignments changes in Logtrade (caused by automatic release, user in web GUI, another API-process etc.) it is important to download the updated status to Business Central to keep the data in sync.

Updating status can be done manually in the consignment worksheet, but also automated by the Job Queue by executing codeunit 12063786. This codeunit will ask Logtrade for status for all consignments in Business Central that has not yet been released in Business Central. The codeunit does not use any parameters specified on the job queue card.

Asking for statuses repeatably for many consignments can be a costly operation for Logtrade. Therefore we have a frequency limit in the delivery setup specified by the field Batch Status Query Interval. This field has a default value of one day and and that value should not be changed without consideration. Regardless of how often codeunit 12063786 is executed, statuses will not be fetched more often than what is specified in this field.

The code:

This is how the frequency limitation specified in the delivery setup is implemented (line 33 to 37).