Actions

Actions gives more control over how the changed records should be distributed and allows you to replicate different records in the same table to different locations / stores, based on filtering and groups like Customer Price Groups, Store Groups, and so on.

Actions relies a lot on Table Distribution that is explained more detailed later in the documentation.

When using Actions, there is an additional step that needs to be executed. You need to setup a scheduler job to run codeunit PreAction -> Action (codeunit 99001560).

Note: In LS Central demo data, this job is named CONVERT-PREACTIONS.

By running it, the system converts Preactions to Actions, listing not only the changed records but also how it should be distributed, based on the Table Distribution setup. Preactions being converted into actions are tracked in the Action Counters table.

Example:

The Data Distribution on change of description of item:

The system detects that a change is made to a record in the Item table. The system writes an entry in the Preaction table, stating the ID of the record, the number of the table (the Item table is number 27) and that the change was in the form of an update to an existing record.

The PreAction->Action (99001560) codeunit is run. The codeunit will see that a change has been made to a record in the Item table from Preaction table. The codeunit looks at the Table Distribution for the Item table to find out how the Item table should be distributed. Depending on the table distribution, the program finds how the record should be distributed.

Once the distribution of the record is found, the program inserts entries into the Actions table for each distribution group and subgroup that the record has.

Note: The whole idea behind the table distribution, the groups and the actions is to have a simple way to find out which data should go where. Once the distribution is set up, it requires almost no maintenance or intervention on the user’s behalf.