--- title: "Add document record fields - Internal documents" slug: "add-document-record-fields-internal-documents" description: "Learn how to add and configure data fields in D365 F&SCM documents, ensuring proper setup for internal records and mandatory field requirements." tags: ["Task topic"] updated: 2026-04-14T08:33:07Z published: 2026-04-14T08:33:07Z canonical: "docs.staedean.com/add-document-record-fields-internal-documents" --- > ## 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 record fields - Internal documents To each document record, add the data fields which values must be exchanged. For internal documents, set up the fields in line with naming in D365 F&SCM. For internal documents, make sure the fields have the same type as in D365 F&SCM. This topic explains how to add records to documents of these types: **D365 F&SCM**, **Journal**, or **Staging**. If fields are already selected for or copied to the record, you can review and complete the setup for these fields. To do so, skip step 6. ### 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 **Records** section, in the **Record** list, find and select the desired record. 6. On the **Fields** tab, click **New**. 7. Select a field from the D365 F&SCM table as defined in the **Record** **table** field. Usually, for internal documents, you do not change the value of the **Field name** field. In the **Field name** field, enter or select a value. 8. To structure the data records and fields in an internal document, use the D365 F&SCM fields. The value of this field is the field as selected in the Field name. In the **Record** **table field** field, enter or select a value. 9. Indicate if the field is a key field for the record. Select the **Key field** check box. 10. Indicate if the field is mandatory to be filled. If on processing the document, the field has no value and **Mandatory** is set to: - **Yes**, an error is given, and the document is not processed. - **Warning**, a warning message is given, but the document is processed. - **No**, the document is processed. In the **Mandatory** field, select an option. 11. Set the field length carefully. Make sure the number of characters is sufficient to contain the value. If you set the length too short, the value is truncated. In the **Length** field, enter a number. 12. If you use a **Custom query** for the document, you can use **Group by**. **Group by** has several types of functions: In the **Group By** field, select an option. > [!NOTE] > **Note** > > This field is available only if for the: > > - Document, on the header, the **Query type** is '**Custom**'. > - Document record, in the **Line details**, **Group by** is set to '**Yes**'. - **Group by function**: Groups records based on the value of one or more fields. - **Aggregate functions**: An aggregate is done based on all records in the group. - **Avg**: Calculates the average value of the field. - **Min**: Gets the lowest value of the field. - **Max**: Gets the highest value of the field. - **Sum**: Totals the field values. - **Count**: Counts the records in the group. - **None**: The field is ignored by the **Group by** function. > [!NOTE] > Note > > You can only delete a record field if it is not used in a: > > - Relation > - Sorting > - Range > > When you delete a field and it is used in one of these cases, a warning message is shown. > > To delete the field, you must first delete the dependent setup. ## Related - [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)