Event Log Fields
This document describes the concept of using events to create a log of changes to the information kept in defined fields and tables inside M3 BE database (db).
Follow these steps
-
In 'Event Subscription. Open' (CMS045), add a subscription to the M3 BE table to be used for the alert. The name of the M3 BE table is used as the event name and M3 as the publisher.
-
The subscription must be activated for event based API calls and must also be set as active.
Define the log fields
-
Define the fields or the table set to be part of the log as a subscription in 'Event Log Fields. Open' (CMS048). Select the field(s) to be activated and set the program status to active.
Post definition steps
-
Once the information to be logged has been defined, the corresponding autojob must be restarted before the updated subscriptions become active in the Event Hub and the new definitions updated to cache.
Restart the autojob in 'Subsystem. Open' (MNS050) and select related option 11='Job in subsystem' for the autojob subsystem (normally named ASJ).
-
Find the autojob program 'Event log' (CMS912) in the list.
-
End (CMS912) and once stopped, start the program again.
View event log
The event log can be viewed in 'Event Log. Display' (CMS300). This program displays the logged fields along with their value before and after the change. This program also stores the date and time of the change, the user who initiated the change and the initial function used to start the work, as well as the function doing the update to the database.
Delete obsolete event logs in batch
You can delete obsolete event logs in batch through 'System Logs. Delete' (CMS330). This function can run on a regular basis using Daily Archiving. Optionally, you need to run (CMS330) again depending on how many event logs are generated daily. Open (CMS330), enter date range and check the ’Event Log’ check box to start a job that deletes event logs in batch.