Synchronize Next Keys

The SyteLine database includes a NextKeys table that lists the last value used for alphanumeric keys whose system-generated value can have a prefix. For example, customer orders can include a prefix like CO, so the order numbers would be CO00001115, CO00001116, and so on. The value in NextKeys is incremented to determine the next system-generated value for the key.

Occasionally, the data in the NextKeys table gets out of synch with the contents of the other database tables that contain the key values. When this happens, the system displays "duplicate key" error messages.

Use this utility to synchronize the NextKeys table with the contents of the database tables that contain the key values. Synchronize Next Keys will rebuild only from local site data.

NOTE: To prevent blocking, this utility should be run only when no other users are logged into the application database.

Contents

The grid on this form contains the following information for each alphanumeric key that can have a prefix:

This information can help you determine if some values are not being used as planned. For example, if someone accidentally entered "CO40000" instead of "CO400" on a new customer order, you would run out of available numbers with that prefix much sooner than planned. If you catch it before more orders are entered, you could delete the problem order and add it back with the correct number.

Comparing Before and After Values

Before you click Process to run the utility, we suggest you copy the grid to a spreadsheet. Then, after the utility completes, compare the values in the grid to the saved values in the spreadsheet to see what (if anything) changed.


Related Topics

Maintaining Application Schema Metadata

Using Utilities and Activities

Application Schema Columns Metadata