External Systems
External Systems are used for having an incremental changelog for configured tables and fields. This is useful in integrations through Web Services or the Integration Queue
The external systems feature is used when Dynamics 365 Business Central is integrated with other systems. The main purpose of the module is to keep other systems synchronized with Dynamics 365 Business Central by creating log entries. These log entries are then retrieved by the external system via Web Services. Once the log entries are fetched the external system performs a read call on the appropriate Web Service to refresh the data in the external system.
It is possible to log and retrieve logged records from any table in Dynamics 365 Business Central. The Web Services in Spider can be used to read data from specific tables and fields. If there is a need to publish other pages or codeunits within Dynamics 365 Business Central, see information on how to publish web services on Microsoft Learn.
Important
It is not recommended to log tables that are intensively updated with a large number of new or changed records, as this may cause table locks and performance degradation.
Note
The synchronization is of the type "one-way synchronization", which means that data set in an External System can only be synchronized from one system to another and not in both directions at the same time.
Flow External Systems API
The flow needs to be repeated frequently, possibly with a scheduler.
- External system calls
spiderExternalSystemAPI.GetChangedRecords()
with an emptyfetchId
asking if there are changed records. spiderExternalSystemAPI.GetChangedRecords()
checks the Unsynchronized list for changed records.- If
spiderExternalSystemAPI.GetChangedRecords()
does not find any changes the External System knows there are no changed records and the call will end. - If
spiderExternalSystemAPI.GetChangedRecords()
does find changesfetchId
will be given a GUID to pack the changes and returns thefetchId
and key of changed records. - External system calls relevant Web service to get the changes
- External system calls
spiderExternalSystemAPI.GetChangedRecords()
with the most recently returnedfetchId
and asks if there are changed records. Step 3 to 6 will repeat until there are no changed records. - When
spiderExternalSystemAPI.GetChangedRecords()
does not find any changes the External System knows there are no changed records and the call will end.
Note
For technical details regarding External Systems API see Technical Reference.
To create a new External System manually
- Choose the search icon (ALT+Q), enter External Systems, and then choose the related link.
- On the External Systems list, choose the New action.
- A new External Systems card opens, hover over a field to read a short description. Proceed to fill the fields as necessary on the General FastTab and select the Type that will define the basis for the behaviors and functionality of the external system.
- Specify the communication to external system more specifically on the Settings FastTab.
- Navigate to Table Setup to set which tables and fields to manage, with or without filters.
- Navigate to External Subsystems (optional) to specify and manage a subsystem to the external system.
Tip
It is possible to set up an external system for synchronizing master data to other companies within the same environment or to other environments (and tenants). Read more in How To Set Up Master Data Sync.
To create a new External System with a guide
- Choose the search icon (ALT+Q), enter External Systems Setup Guide, and then choose the related link.
- Complete the steps in the guide and then select Finish.
Note
Changes of the type Insert in tables that contain a primary key set to AutoIncrement does not work with the External Systems changelog. This is due to that the value of the field at the time of logging is always 0. But this can be solved by a PTE with a subscriber to the OnAfterInsert Event of the table with a call to the LogInsert function in Spider.
See Also
How To
Integrations
Integration Queue
Extra Fields
Web Services