Show / Hide Table of Contents

    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.

    External System Overview

    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

    External System API

    The flow needs to be repeated frequently, possibly with a scheduler.

    1. External system calls spiderExternalSystemAPI.GetChangedRecords() with an empty fetchId asking if there are changed records.
    2. spiderExternalSystemAPI.GetChangedRecords() checks the Unsynchronized list for changed records.
    3. If spiderExternalSystemAPI.GetChangedRecords() does not find any changes the External System knows there are no changed records and the call will end.
    4. If spiderExternalSystemAPI.GetChangedRecords() does find changes fetchId will be given a GUID to pack the changes and returns the fetchId and key of changed records.
    5. External system calls relevant Web service to get the changes
    6. External system calls spiderExternalSystemAPI.GetChangedRecords() with the most recently returned fetchId and asks if there are changed records. Step 3 to 6 will repeat until there are no changed records.
    7. 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

    1. Choose the search icon (ALT+Q), enter External Systems, and then choose the related link.
    2. On the External Systems list, choose the New action.
    3. 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.
    4. Specify the communication to external system more specifically on the Settings FastTab.
    5. Navigate to Table Setup to set which tables and fields to manage, with or without filters.
    6. 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

    1. Choose the search icon (ALT+Q), enter External Systems Setup Guide, and then choose the related link.
    2. 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

    Back to top Copyright © 2020 SmartApps
    Generated by DocFX