--- title: "Define range" slug: "define-range-internal" tags: ["Task topic"] updated: 2026-03-20T07:50:20Z published: 2026-03-20T17:44:19Z canonical: "docs.staedean.com/define-range-internal" --- > ## 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. # Define range For each record in an internal or **ODBC** document, you can define the range of data that is queried for export or import. For example, you only want to export sales orders for a specific customer group. To do so, on the **Range** tab, add a record for the **CustGroup** field. For more information on how to define ranges in the **Range** field, refer to [Advanced filtering and query syntax](https://learn.microsoft.com/en-us/dynamics365/fin-ops-core/fin-ops/get-started/advanced-filtering-query-options). ### Steps 1. Click **Connectivity studio - Integration Design**. 2. Click the **Documents** tab. 3. In the list, find and select the desired internal or **ODBC** document. 4. Click **Edit**. 5. In the **Record** section, in the **Record** list, find and select the desired record. 6. Click the **Range** tab. 7. Click **New**. 8. You can indicate if a range is added only for testing purposes. It is not applied in runtime. When testing is finished, you can remove the range. Select the **Test** check box. 9. In the **Record field** field, enter or select a value. > [!NOTE] > **Note** > > You can only enter a range for a field that is also defined in the record fields. 10. You can apply ranges of these types: In the **Range type** field, select an option. - **Value**: Enter a fixed value or a range of values using the advanced query syntax. - **Custom**: Enter a static method that defines the range. For example, you can use the SysQueryRangeUtil class to apply advanced date queries. Other examples are: 'curExt()' (gets the current company), 'strFmt("%1..%2", prevMth(today()), today())' (gets the orders from the last month), and 'DateTimeUtil::utcNow()' (filters on the current date/time). - **Parameter**: Enter an argument name that is defined in the BisDialogBase class. In this way, you can pass arguments to the message via code. This option only applies to D365 F&SCM documents. 11. Define the range in line with the selected type. In the **Range** field, type a value. 12. Close the page. > [!NOTE] > **Notes** > > - By default, the entity name field is used as an extra range. If on import, the data source name is known, it creates an entity with the correct name. For EDIFACT, you cannot always use this. For example, for the dates (DTM) segment, no easy condition exists to find the right date. Therefore, you can add your own range. This range skips the range for the entity name. A range to the createdTransactionid is used to make sure that the current set is imported. For each transaction scope a new ID is created. > - If you have defined a range of type **Custom**, you can test if the expression gives the expected result. To do so, on the **Action Pane**, on the **Development** tab, click **Custom** range. On the dialog, in the **Expression** field, enter the expression, and press **Tab**. The expression result is shown in the **Result** field. ## Related - [Apply a custom argument as range parameter to an export](/apply-a-custom-argument-as-range-parameter-to-an-export.md) - [Apply a custom expression to define a document record range](/apply-a-custom-expression-to-define-a-document-record-range.md) - [Manage document record setup - ODBC documents](/manage-document-record-setup-odbc-documents.md) - [Manage document record setup - EDI documents](/manage-document-record-setup-edi-documents.md) - [Manage document record setup - Internal documents](/manage-document-record-setup-internal-documents.md)