Επεξεργασία

Κοινή χρήση μέσω


Scheduling a Synchronization between Business Central and Dataverse

You can synchronize Business Central with Dataverse on scheduled intervals by setting up jobs in the job queue. The synchronization jobs synchronize data in Business Central records and Dataverse records that are coupled. For records that are not already coupled, depending on the synchronization direction and rules, the synchronization jobs can create and couple new records in the destination system.

There are several synchronization jobs that are available out-of-the-box. The jobs are run in the following order to avoid coupling dependencies between tables. For more information, see Use Job Queues to Schedule Tasks.

  1. CURRENCY - Common Data Service synchronization job.
  2. VENDOR - Common Data Service synchronization job.
  3. CONTACT - Common Data Service synchronization job.
  4. CUSTOMER - Common Data Service synchronization job.
  5. SALESPEOPLE - Common Data Service synchronization job.

You can view the jobs on the Job Queue Entries page. For more information, see Use Job Queues to Schedule Tasks.

Default synchronization job queue entries

The following table describes the default synchronization jobs for Dataverse.

Job Queue Entry Description Direction Integration Table Mapping Default Synchronization Frequency (mins) Default inactivity sleep time (mins)
CONTACT - Common Data Service synchronization job Synchronizes Dataverse contacts with Business Central contacts. Bidirectional CONTACT 30 720
(12 hours)
CURRENCY - Common Data Service synchronization job Synchronizes Dataverse transaction currencies with Business Central currencies. From Business Central to Dataverse CURRENCY 30 720
(12 hrs)
CUSTOMER - Common Data Service synchronization job Synchronizes Dataverse accounts with Business Central customers. Bidirectional CUSTOMER 30 720
(12 hrs)
VENDOR - Common Data Service synchronization job Synchronizes Dataverse accounts with Business Central customers. Bidirectional VENDOR 30 720
(12 hrs)
SALESPEOPLE - Common Data Service synchronization job Synchronizes Business Central salespeople with Dataverse users. From Dataverse to Business Central SALESPEOPLE 30 1440
(24 hrs)

Synchronization process

Each synchronization job queue entry uses a specific integration table mapping that specifies which Business Central table and Dataverse table to synchronize. The table mappings also include some settings that control which records in the Business Central table and Dataverse table to synchronize.

To synchronize data, Dataverse table records must be coupled to Business Central records. For example, a Business Central customer must be coupled to a Dataverse account. You can set up couplings manually, before running the synchronization jobs, or let the synchronization jobs set up couplings automatically. The following list describes how data is synchronized between Dataverse and Business Central when you are using the synchronization job queue entries. For more information, see Couple and Synchronize Records Manually.

  • The Sync. Only Coupled Records check box controls whether new records are created when you synchronize. By default, the check box is selected, which means that only records that are coupled will be synchronized. In the integration table mapping, you can change the table mapping between a Dataverse table and a Business Central table so that the integration synchronization jobs will create new records in the destination database for each row in the source database that is not coupled. For more information, see Creating New Records.

    Example If you clear the Sync. Only Coupled Records check box, when you synchronize customers in Business Central with accounts in Dataverse, a new account is created for each customer in Business Central and automatically coupled. Additionally, because the synchronization is bidirectional in this case, a new customer is created and coupled for each Dataverse account that is not already coupled.

    Note

    There are rules and filters that determine what data is synchronized. For more information, go to Synchronization Rules.

  • When new records are created in Business Central, the records use the either the template that is defined for the integration table mapping or the default template that is available for the row type. Fields are populated with data from Business Central or Dataverse depending on the synchronization direction. For more information, see Modify Table Mappings for Synchronization.

  • With subsequent synchronizations, only records that have been modified or added after the last successful synchronization job for the table will be updated.

    New records in Dataverse are added in Business Central. If data in fields in Dataverse records has changed, the data is copied to the corresponding field in Business Central.

  • With bidirectional synchronization, the job synchronizes from Business Central to Dataverse, and then from Dataverse to Business Central.

About inactivity timeouts

Some job queue entries, such as those that schedule synchronization between Business Central and Dataverse, use the Inactivity Timeout field on the Job Queue Entry page to prevent the job queue entry from running unnecessarily.

Flowchart for when job queue entries are put on hold due to inactivity.

When the value in this field is not zero, and the job queue did not find any changes during the last run, Business Central puts the job queue entry on hold. When that happens, the Status of Job Queue field will show On Hold Due to Inactivity, and Business Central will wait for the period of time specified in Inactivity Timeout field before it runs the job queue entry again.

For example, by default, the CURRENCY job queue entry, which synchronizes currencies in Dataverse with exchange rates in Business Central, will look for changes to exchange rates every 30 minutes. If no changes are found, Business Central puts the CURRENCY job queue entry on hold for 720 minutes (twelve hours). If an exchange rate is changed in Business Central while the job queue entry is on hold, Business Central will automatically reactivate the job queue entry and restart the job queue.

Note

Business Central will automatically activate job queue entries that are on hold only when changes happen in Business Central. Changes in Dataverse will not activate job queue entries.

To view the synchronization job log

  1. Choose the icon, enter Integration Synchronization Log, and then choose the related link.

  2. If one or more error occurred for a synchronization job, the number of errors appears in the Failed column. To view the errors for the job, choose the number.

    Tip

    You can view all synchronization job errors by opening the synchronization job error log directly.

To view the synchronization job log from the table mappings

  1. Choose the icon, enter Integration Table Mappings, and then choose the related link.
  2. In the Integration Table Mappings page, select an entry, and then choose Integration Synch. Job Log.

To view the synchronization error log

  • Choose the icon, enter Integration Synchronization Errors, and then choose the related link.

See also

Synchronizing Data in Business Central and Dataverse
Manually Synchronize Table Mappings
Scheduling a Synchronization between Business Central and Dataverse
About Integrating Dynamics 365 Business Central with Dataverse

Find free e-learning modules for Business Central here