--- title: "Add document records - Internal document" slug: "add-document-records-internal-document" description: "Learn how to add data records to D365 F&SCM documents, including Journals and Staging, with detailed steps for effective data management." tags: ["Task topic"] updated: 2026-03-20T07:58:05Z published: 2026-03-20T17:44:14Z canonical: "docs.staedean.com/add-document-records-internal-document" --- > ## 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. # Add document records - Internal document To each document, add the data records to be exchanged. For internal documents, set up the records in line with how the data is structured and named in D365 F&SCM. This topic explains how to add records to documents of these types: **D365 F&SCM**, **Journal**, or **Staging**. ### Steps 1. Click **Connectivity studio - Integration Design**. 2. Click the **Documents** tab. 3. In the list, find and select the desired document of one of these types: **D365 F&SCM**, **Journal**, or **Staging**. 4. Click **Edit**. 5. In the **Record** section, click **Add** **line**. 6. For the record, select the D365 F&SCM table which data must be exchanged. Usually, for internal documents, you do not change the selected value of the **Record** field. In the **Record** field, type a value. 7. To structure the data records and fields in an internal document, use the D365 F&SCM tables. The value of this field is the D365 F&SCM table as selected in the **Record** field. In the **Record** **table** field, enter or select a value. 8. Use the parent record to define a record structure with parent-child relations. In the **Parent record** field, enter or select a value. 9. By default, if you have a parent-child relation, the parent and child data is processed separately. You can process the parent and child data together. Select **Yes** in the **Combine with parent record** field. 10. This setting is only applicable to parent records. - **Inner join**: To process the parent record, the child record must exist. **Example:** A sales order is only processed if it has a sales line. If no sales line exists, the sales order is not processed. If a sales line exists, both the sales order and the sales line are processed. - **Outer join**: To process the parent record, it is not required that child a record exists. **Example:** A sales order with no sales lines is processed. - **Exists join**: To process the parent record, a child record must exist. **Example:** If sales order has a sales line, only the sales order is processed. If the sales order does not have a sales line, the sales order is not processed. - **NoExistsJoin**: Only parent records are processed that do no have child records. **Example:** A sales order is only processed if it does not have a sales line. In the **Join mode** field, select an option. 11. During an import or export you can have the need to update another table in D365 F&SCM. Usually, this is an internal history table to trace what is imported or exported. If you select **Yes**: - The record is skipped by the query. And therefore, not exported to an external format. - You can use the record in the message mapping. - The record uses the validations as defined in D365 F&SCM. Select **Yes** in the **History** field. 12. Sub-task: Set record details. 1. Expand the **Line details** section. 2. A document record can result in a selection of several matching records. In some cases, you only want to select one record for a document record. With the **Custom query**, you can use the Select first record function. Selecting only one record improves the performance. Select **Yes** in the **First record only** field. > [!NOTE] > **Note** > > **This** field is available only if for the document, on the header, the **Query type** is '**Custom**'. 3. With the **Custom query**, for internal documents, you can use **Group by** to summarize, condense, and analyze data during export. Select **Yes** in the **Group By** field. > [!NOTE] > **Note** > > This field is available only if for the document, on the header, the **Query type** is '**Custom**'. ## Related - [Using 'Join mode' and 'Combine with parent record' on document records](/using-join-mode-and-combine-with-parent-record-on-document-records.md) - [Custom query for internal documents](/custom-query-for-internal-documents.md) - [Set up D365 F&SCM document](/set-up-d365-fscm-document.md) - [Set up journal documents](/set-up-journal-documents.md) - [Set up Staging document](/set-up-staging-document.md)