--- title: "Set up data synchronization - Date range - Message" slug: "set-up-data-synchronization-date-range-message" tags: ["Task topic"] status: "update" updated: 2026-10-05T12:02:56Z published: 2026-10-05T12:02:56Z canonical: "docs.staedean.com/set-up-data-synchronization-date-range-message" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.staedean.com/llms.txt > Use this file to discover all available pages before exploring further. # Set up data synchronization - Date range - Message On export of data, the data synchronization setup defines which records are processed. Data synchronization only applies to messages with a source document of one of these types: - Internal document - ODBC (or ODBC Dynamics) 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 was 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 with a date/time that is later than the latest run date/time of the message are exported. ### Steps 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 compared with the latest run date/time of the defined message instead of the current message. **Example:** You have two messages: a sales orders message and a sales lines message. The sales lines message depends on the sales orders message. The date/time of the sales lines is compared with the latest run date/time of the sales orders 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. As a result, whichever company the message was last run in, this latest run date/time applies to all companies in your D365 F&SCM environment. If you run the same message in several companies, you can choose to store the latest run date/time per company. In that case, if you run the message, the company-specific latest run date/time is: 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**. - 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. 11. Close the page.