Set up Record Pools
Tip
Summary: This chapter explains how to set up record pools in order to record data modifications. It provides instructions on how to create a record pool card, and how to create record pool entries. It also provides information on the Record Pool Recorder, and detailed logging information.
If you want to record any data modifications, you must set up record pools.
To create a record pool card
- How do I create a record pool card?
- What are the options for unprocessed entries?
- What are the options for processed entries when an error occurs?
- What is the Log Events checkbox?
- What are the events integrated as standard in COSMO Data Integration Framework?
- What is the Autom. BreakLoop after Records field?
- What are Record Pool Entries?
- How can I delete processed Record Pool Entries?
- What happens when a Mapping is executed?
- What happens if an error occurs during a Mapping?
- What happens after each Mapping process?
Tip
Summary: This chapter explains how to set up and create record pool cards, as well as how to create record pool entries and detailed record pool entry logging information. It also discusses specific fields on the General, Partners and Entries FastTabs, and the behavior of unprocessed and processed entries.
- Choose the icon, enter Record Pools - Data Integration Framework, 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 checkbox 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 might also create Record Pool Entries by calling the LogEvent(<Record Pool>) function of Codeunit 5100915, DIS - Record Pool Mgt..
The Autom. BreakLoop after Records field processes a BreakLoop automatically after reaching the amount of records in the loop of a mapping. A value of zero (0) makes no BreakLoop at all. Use the Reservation Limit field in combination to specify how many record pool entries are reserved before mapping execution. A value of zero (0) reserves all available entries. The value should be equal or higher to the automatic BreakLoop limit.
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
- How do I create record pool entries?
- What is detailed record pool entry logging information?
- What are the types of changes I can select when creating record pool entries?
- What should I do after changing a Record Pool or a Record Pool Partner?
- How do I capture the incremented field value for tables with a primary key consisting of two or more fields?
Tip
Summary: This chapter provides instructions on how to create record pool entries. It outlines the steps to open the Create Record Pool Entries Wizard, select the Type of Change, select relevant records, and close the wizard. It also discusses the Record Pool Recorder and provides debugging advice as to why an entry may not have been created.
- Choose the Create Record Pool Entries action to open the Create Record Pool Entries Wizard.
- Locate the Table Filter field and use the Assist edit button to filter the table of the record pool. The Record Count will display the number of filtered records in the table, which can be used in the next steps.
- In the Record Pool Filter field, define the record pool code for the record pool entries. Leave this field empty to process the record action (type of change) for the table and thereby all tracked record pool entries.
- Set the Record Pool Partner Filter field to define the record pool partners for the record pool entries as filter value. Leave this field empty to process the record action (type of change) for all related partners in the record pool.
- Choose the Type of Change field and select the desired type of change for the record pool entries from the available options:
- Database Insert – Simulates a record is created.
- Database Modify – Simulates a record is modified.
- Database Delete – Simulates a record is deleted.
- Database Rename – Simulates a Primary Key change of the record.
- Codeunit Event – Simulates a change event for the record.
- In the Force Creation field, define whether the record pool entries are created or updated independent of any record pool verification.
- Set the Is Mapping field to specify if the record pool entries are created as part of a mapping execution.
- Choose Next to proceed to the next page of the wizard.
- On the following page, you will see all filtered records. Use the available actions to select or unselect the records for which the chosen change should be recorded. After you have made your selection, choose Next to go to the next page of the wizard.
- Choose Next once more to navigate to the final page of the wizard. The Record Pool Entries field displays the number of created or updated record pool entries.
Understanding record pool settings
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.
For tables with a primary key consisting of two or more fields, where one field has the property AutoIncrement = true, the auto increment happens after the OnDatabaseOnAfterInsert trigger. Therefore it's not possible to capture the incremented field value by a generalized way. The field value and the record pool entry record ID will be 0. Manually subscribe to the OnAfterInsertEvent trigger of this table and log a Type of Change = Codeunit Event, to capture record insertion.
Use the Record Pool Recorder to capture insights about the record pool entry creation process. This helps to debug why an entry might have not been created.
Record Pool Recorder
- How do I use the Record Pool Recorder?
- How do I start and stop the recording?
- What is the Show Table Trigger Cache action?
Tip
Summary: The Record Pool Recorder is a feature of the COSMO Data Integration Framework which allows you to record the modifications and decisions of the record pool management. The page displays the actions in order and also allows you to view the table triggers cached for performance reasons.
With the help of the Record Pool Recorder you can record the modifications and decisions of the record pool management. The page visualizes what happened inside of the record pool codeunit to identify if an entry was created, modified, or why the entry validation might have failed.
- Choose the icon, enter Record Pool Recorder - Data Integration Framework, and then choose the related link.
- Choose the Start action to start the recording. The page must stay open while recording. Choose the Open this page in a new window icon in the top right corner of the page to open the page in a new window.
- Proceed with the process you want to record. Meanwhile, all modifications and record pool decisions are recorded.
- Choose the Stop action in the new window to stop the recording. The page will list all actions in order.
Choose the action Show Table Trigger Cache to display the table triggers which Dynamics 365 Business Central has cached for performance reasons.
Detailed Record Pool Entry Logging Information
- What happens when a record is inserted?
- What happens when a record is deleted?
- What happens when a record is renamed?
- What is the status handling information for Record Pool Entries when making modifications to records?
Tip
Summary: When modifying records in the Record Pool, different types of entries (Insert, Modify, Rename, Delete, and Event) and statuses (Created, Deprecated) are used to log changes. Selecting the Log Deletion checkbox in the Record Pool Partner FastTab will change the status of appropriate entries to Deprecated. Additionally, if a rename was logged, further modifications will create a new Record Pool Entry to save the rename entry.
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 checkbox 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 checkbox 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.
- To access field values of a renamed record, use negative field numbers (e.g., -1 instead of 1) to access the values before renaming (xRecord), and positive numbers for values after renaming (Record). This method enables you to export both old and new values into an XML or JSON file, facilitating the rename process in the target system.
Feedback
Submit feedback for this page .