Set up Record Pools
If you want to record any data modifications, you must set up record pools.
To create a record pool card
- Choose the icon, enter Data Integration Framework Record Pools, and then choose the related link.
- Choose the New action.
- On the Record Pool Card page, fill in the fields as necessary. Hover over a field to read a short description.
Specific fields on the General FastTab
The Mapping Post-Processing area on the General FastTab describes the behavior of unprocessed and processed entries.
The options for Unprocessed Entries are:
- Created – Saves unprocessed entries as Created.
- Reserved – Saves unprocessed entries as Reserved.
- In Progress – Saves unprocessed entries as In Progress.
- Processed – When saving, the Status is set to Processed; default option.
- Deprecated – Saves unprocessed entries as Deprecated.
The options for Processed Entries when Error are:
- Created – Changes the Status back to Created; default option.
- Reserved – Changes the Status back to Reserved.
- In Progress – Changes the Status back to In Progress.
- Processed – When saving, the Status is maintained as Processed.
- Deprecated – Changes the Status to Deprecated.
Specific fields on the Partners FastTab
For each Partner, different actions can be logged for Records, like Insertion, Modification, or Deletion. This only applies to tables according to the Record Pool. These settings are made on the Partners FastTab.
The Log Events check box specifies whether to log a number of changes that are intercepted and recorded by Microsoft Dynamics 365 Business Central events, like function calls. The following events are integrated as standard in COSMO Data Integration Framework:
- Codeunit 80, OnAfterPostSalesDoc – Sales Invoice Header and Sales Shipment Header
- Codeunit 90, OnAfterPostPurchaseDoc – Purchase Invoice Header and Purchase Receipt Header
- Codeunit 414, OnAfterReleaseSalesDoc – Sales Header
- Codeunit 415, OnAfterReleasePurchaseDoc – Purchase Header
Own source code may also create Record Pool Entries by calling the LogEvent(<Record Pool>) function of Codeunit 5100915, DIS - Record Pool Mgt.
Specific fields on the Entries FastTab
Record Pool Entries are logged changes of data for one Partner. For each type of change (Insertion, Deletion, …) one Record Pool Entry is created. If a record is changed and an entry already exists (Status = Created), then the Type of Change will be overwritten and updated. For each Record, just one unprocessed entry exists for one Partner.
These settings are made on the Entries FastTab.
Processed Record Pool Entries can be deleted manually or by using the command queuing of Codeunit 5100910, DIS - Sequence Adapter. For more information, see Automation.
When a Mapping is executed, all Record Pool Entries are reserved (Status = Reserved) for the Mapping and the Partner. The reserved entries are temporarily displayed for the Mapping and a dialog box opens, stating that the Record Pool is processed. When the Mapping is processed, all transitory entries are set to Status = In Progress. After all indented Mapping Lines are processed, the Status is set to Processed. At the end of the Mapping, all changes are transferred to the reserved Record Pool Entries, and a dialog box opens, stating that the Record Pool is saved.
If an error occurs during a Mapping, the setting of the Processed Entries when Error field (on the Record Pool Card page) determines if the Status is Processed or Created for Processed Entries. A notification will open, which shows errors only once when processing in a sequence. If an error occurs, Microsoft Dynamics 365 Business Central will process a general rollback of all modified Records.
After each Mapping process, all unprocessed entries are set to Status = Processed or Created, according to the setup for the Unprocessed Entries field.
To create record pool entries
- Choose the Create Record Pool Entries action to open the Create Record Pool Entries Wizard.
- On the first page, select the Type of Change. The options are:
- Database Insert – Record is created.
- Database Modify – Record is modified.
- Database Delete – Record is deleted.
- Database Rename – Primary Key of record changes.
- Codeunit Event – Record is changed by an event.
- Choose the Next button.
- On the next page, select all relevant records for which the selected change should be recorded and then choose the Next button.
- A message will open stating how many entries were created; choose the OK button.
- Then choose the Finish button to close the wizard. The creation process can be stopped by choosing the Cancel button in the wizard.
The modification trigger is called for each marked record and for the selected Record Pool. Filters, Fields, and Partner settings of the Record Pool are still being considered.
To achieve a high level of performance, all settings of the Record Pool Partner are stored temporarily for each session. After changing a Record Pool or a Record Pool Partner, it is advisable to restart all clients. Alternatively, use the Reset Record Pool Logging Cache action on the Data Integration Framework Setup page to clear the cache of the current client.
Detailed Record Pool Entry Logging Information
The ways in which Record Pool Entries can be created/modified/deleted are described as follows:
- When inserting a record, previous entries of type Insert/Modify/Event are not changed. Only a Rename-entry will create a new Insert-entry. All Delete-entries will be deprecated afterwards.
- When deleting a record, previous Insert-entries are deprecated. Previous Rename-entries will stay untouched and a new delete-entry will be created. Previous entries of type Modify/Delete/Event are updated to a Delete-entry.
- When renaming a record, previous Insert- and Rename-entries are updated to the new Record ID, whereas existing Delete-entries are deprecated. Previous Modify- or Event-entries will be deprecated, and two new entries are created: one Rename-entry and then one Modify-entry.
Some additional status handling information for Record Pool Entries when making modifications to records is as follows:
- If a record is deleted, and the Log Deletion check box is not selected, all appropriate Record Pool Entries with Status = Created will be set to Status = Deprecated. These entries will not be loaded for the next mapping processing.
- If the Log Deletion check box is selected in the Record Pool Partner FastTab, all appropriate entries with Type of Change = Insert or Event will be changed to Status = Deprecated. Other entries (Status = Modify, Rename, and Delete) will update the current entry fields.
- If a rename was logged, further modifications will always create a new Record Pool Entry to save the rename entry.
Submit feedback for.