On export from D365 FO to a file, you can create a separate file for each root record. You can, for example, create a separate file for each sales order. You can also create files with a limited number of records. So, the processed records are split over several files.
You define the required settings on the source document, the target document, and the message.

Source document settings:

To improve performance when processing a lot of records, you can use paging. For paging, the records are split over several threads which run these records in parallel batch tasks.
If you export data, use an internal document as source document. On the internal document, consider these settings to split records over several threads:
  • Header, Properties, Query page size: Define the number of records to be processed by one batch task. The query page size is applied to the root record only.

  • Record, Sorting: If you define the query page size, also set up the sorting for the root record of the document. The sorting defines the order in which the data in the record is queried and processed during export. For example, to export sales orders, you want the sales order to be queried by customer and for each customer by delivery date. To do so, on the Sorting tab, add a record for both the CustAccount field and the DeliveryDate field, in this sequence.

Message settings:

For data export, it can be that a limited number of root records per file is allowed. You can define the maximum allowed number of records per file. If more records are included in one message run, these records are split over several files, based on the split quantity. You can use the splitting functionality to create files with a limited number of root records or even separate files for each root record.
To split records over several files, this setting is required on the message:
  • Header, Split options, Split quantity: Define the maximum allowed number of records per file. If you want to create a separate file for each root record, enter '1' as split quantity.

Target document settings:

If you split records over several files, these files can be created at the same date and time. Only using date and time variables (%2, %3, or %10) in the filename does not make the filename unique enough. To create unique filenames, use a number sequence to define the filename.
If you export data to a file, use an external file-based document as target document. On the external file-based document, these settings are required when you split records over several files:
  • Header, Write options: 
    • Number sequence: Define the number sequence that is used to add a unique number to the filename of each created file.
    • Write filename: Add at least the %4 variable to the filename for the files that are created based on the document. Example: %1%4.%9, which can result in 'SalesOrder12345.xml'.
      Note: If the split quantity is more than 1, do not use the record ID as file name variable.

See also

Provide feedback