On export of data, the data synchronization setup defines which records are processed.
Data synchronization only applies to messages with an internal document as source document.
This topic explains how to use a date range to export only the records that are changed or added since the latest message run.
Make sure, the root record of the source document has a date/time field that indicates when the record is last changed, for example a 'modifiedDateTime' field. If you run the message, all records that are found, based on the source document setup, are considered. For each found root record, the date/time is compared with the Latest run date/time of the message. Only the records are exported with a date/time that is later than the latest run date/time of the message.


Standard procedure

1. Click Connectivity studio Integration Design.
2. On the Message tab, in the list, find and select the desired message.
3. Click Edit.
4. Click Header.
5. Expand the Setup for data synchronization section.
6. In the Synchronization type field, select 'Date range'.
7. Click Save.
8. Select the date/time field of the root record that is used for the date range. For example, a 'modifiedDateTime' field.
  In the Record field field, enter or select a value.
9. This field is related to the Record field field. You can define another message on which the current message depends. As a result, the date/time of the records is checked with the Latest run date/time of the defined message instead of the current message.
Example: You have these messages: sales orders message and sales lines message. The sales lines message depends on the sales order message. The date/time of the sales lines is compared with the latest run date/time of the sales order message. You can, for example, use this to prevent exporting sales lines that do not yet have a sales order in the target.
  In the Depends on message field, enter or select a value.
10.

By default, the latest run date/time of a message is stored globally. So, in whatever company the latest message run is done, this latest run date/time applies to all companies in your D365 FO environment.

If you run the same message in several companies, you can choose to store the latest run date/time per company. So, if you run the message, the company-specific latest run date/time is:

  • Used to define which records are exported for the company in which you run the message.
  • Updated only for the company in which you run the message.

If you run the same message in another company, the company-specific latest run date/time, as stored for that company, applies.

  In the Store last run per company field, select Yes.
11. Close the page.

Provide feedback