Master Data Management (= MDM) enables direct data distribution from one source company to several target companies. The Distribution is based on global trigger events, which are triggered when data is entered. This means that the data synchronization takes place directly in the transaction. The data to be distributed is defined in master data relations. Data distribution can be centralized or decentralized.
The protection of data consistency is ensured by various implemented security mechanisms.
In order to distribute the records of a table, a relation must be created and released for this table. A relation is a combination of source and target company, a table and the corresponding fields that are to be distributed.
In order to distribute data records, at least all primary key fields of a table must be included in the relation. All other fields can be added optionally as long as these fields meet the following requirements:
the field is present and activated
the field has the FieldClass::Normal
the field does not have the ObsoleteState::Removed
If all the requirements for distributing records are met and corresponding relations exist and are released, the records are distributed automatically during insertion, modification and deletion of records.
The following table shows the subscribed events and the MDM procedures called:
Event of Codeunit 49 GlobalTrigger Management | Subscriber of Codeunit 5581451 BET MDM C49GlobalTriggerMgtEH | Called procedure in Codeunit 5581452 BET MDM Master Data Funcs |
---|---|---|
OnAfterGetDatabaseTableTriggerSetup | GetDatabaseTableTriggerSetup | GetDatabaseTableTriggerSetupForRelations |
OnBeforeOnDatabaseInsert | OnBeforeOnDatabaseInsert | CheckBeforeDatabaseInsert |
OnBeforeOnDatabaseModify | OnBeforeOnDatabaseModify | CheckBeforeDatabaseModify |
OnBeforeOnDatabaseDelete | OnBeforeOnDatabaseDelete | CheckBeforeDatabaseDelete |
OnBeforeOnDatabaseRename | OnBeforeOnDatabaseRename | CheckBeforeDatabaseRename |
OnAfterOnDatabaseInsert | OnAfterOnDatabaseInsert | DatabaseInsert |
OnAfterOnDatabaseModify | OnAfterOnDatabaseModify | DatabaseModify |
OnAfterOnDatabaseDelete | OnAfterOnDatabaseDelete | DatabaseDelete |
OnAfterOnDatabaseRename | OnAfterOnDatabaseRename | DatabaseRename |
The changes to a data record are recognized by global trigger events if the global trigger variables are set in the system for the corresponding tables. To set the global trigger variables, the provided event OnAfterGetDatabaseTableTriggerSetup from codeunit 49 GlobalTriggerManagement is subscribed from codeunit 5581451 BET MDM C49GlobalTriggerMgtEH. The procedure GetDatabaseTableTriggerSetupForRelations of the codeunit 5581452 BET MDM Master Data Funcs then checks whether a relation for the passed table ID exists in the calling company. If this is the case, the following global trigger variables are set to true:
OnDatabaseInsert
OnDatabaseModify
OnDatabaseDelete
OnDatabaseRename
Processing continues until the global database trigger events of codeunit 49 GlobalTriggerManagement are called. These are in turn subscribed to by the subscribers of the codeunit 5581451 BET MDM C49GlobalTriggerMgtEH and the corresponding procedures of the codeunit 5581452 BET MDM Master Data Funcs are executed to further process the data change.
Before a record can be created, modified or deleted, the OnBeforeOnDatabase events are first subscribed to and the corresponding procedures are executed. The main thing that is checked here is whether the change comes from a target company that is not set up for decentralized distribution. Then a change would not be permitted and an error message would be generated.
After inserting, modifying or deleting a record, the OnAfterOnDatebase events are subscribed to and the corresponding MDM procedures are executed. It is first checked whether the change was triggered by a target company or a source company.
When a change is made from a target company, it is always inserted/modified/deleted first to the source company and then distributed from there to all other target companies (except the calling target company, see decentralized distribution).
If a change is made from a source company, only the changes are distributed to the target companies (see centralized distribution).
When distributing the data records, the data record is first created (Insert) or fetched (Modify) in the corresponding target company. All set-up relation lines are then run through and the values from the source company and target company are compared field by field. The settings made in the relation lines are taken into account.
Once all fields of the relation have been processed, the data record in the target company is first marked before it is inserted or modified. Marking the data record ensures that there is no endless loop, as the global database trigger events are executed again when the Insert, Modify or Delete commands are executed. At the beginning of the MDM procedures, it is first checked whether a data record is marked and further processing is stopped if this is the case.
After the record has been inserted, modified, or deleted in the target company, the record is unmarked, the MDM procedures are exited, and normal processing continues.
In the case of a central data distribution, the distribution takes place from the company defined as the master data client to the target companies (unidirectional distribution).
When changing a record in a table, global trigger events are executed. Defined instructions are executed, which check, distribute and, if necessary, transform the data to the target company. After the global trigger events have been executed, the data is then visible in the tables of the target companies.
If decentralized data distribution (bidirectional distribution) is set for a relation, the data can also be distributed from one target company to the other companies (master data company and other target companies). Inserting, changing or deleting data is then permitted in the target company.
When changing a record in a table, global trigger events are executed. Defined instructions are executed, which first distribute the data to the company marked as the master data company. This is then distributed to the other target companies. After the global trigger events have been executed, the data is then visible in the tables of the master data company and all target companies.