# Record Field

Renders one field from the current transaction record. Auto-detects the field type and provides the right input control. Includes built-in handling for two special fields: `order_type` (a fixed 6-option dropdown) and `order_id` (read-only, shows the BRM order ID after submit).

The block also supports a **dynamic default value** — an expression that resolves at render time based on context (user, location, etc.).

## Available in

* Order Form modules
* Public Page modules

## When to use

* Order Form pages where the user needs to set or see specific transaction header fields — order type, memo, custom fields, departments, classes.
* Anywhere you need a single transaction-record field on the page rather than the whole record.

For customer-record fields, use **Customer Field** instead.

## Settings

| Setting       | Description                                                                   |
| ------------- | ----------------------------------------------------------------------------- |
| **Configure** | Opens the configuration modal — field selection, label, width, type, default. |

The configuration modal supports:

* **Field Name** — which transaction field. Includes hardcoded `order_type` and `order_id` plus all standard / custom fields from the record type.
* **Field Label** — display label.
* **Width** — input width in pixels. Default: 200.
* **Field ID** — internal field identifier (auto-resolved).
* **Field Type** — auto-populated: text, boolean, select, date, longtext, readonly, number, email, url.
* **Field Options** — for select fields (auto-populated).
* **Required** — make the field required to submit. Default: No.
* **Disabled** — render read-only. Default: No.
* **Hidden** — hide the block from rendering. Default: No.
* **Record Type** — which record this field belongs to (`salesorder`, `cashsale`, etc.). Default: salesorder.
* **Default Value** — static pre-fill value.
* **Is Dynamic Default** — when enabled, **Dynamic Default Value** is an expression evaluated at render time.

## How it works

1. Reads the field type and options for the configured Field Name (5-min cache by record type).
2. Renders the right input control.
3. For `order_type`, surfaces the fixed list of 6 order types.
4. For `order_id`, renders read-only and shows the BRM order ID (or hides if no order ID exists yet).
5. For dates, converts between MM/DD/YYYY display and YYYY-MM-DD HTML5 input.
6. Stores the value in `recordFields` on the order state via `setRecordField`.

{% hint style="info" %}
Use **Hidden = Yes** when you want to populate a field via Dynamic Default but not let the user see it (e.g. capture the location into a hidden header field).
{% endhint %}

## Examples

**Order type picker.** Record Field with Field Name = `order_type`. Drives the rest of the form's behaviour (e.g. Address visibility based on order type).

**Memo field.** Record Field with Field Name = `memo`, Field Label = *Memo*, Required = No.

**Hidden default location.** Record Field with Field Name = `location`, Hidden = Yes, Is Dynamic Default = Yes, Dynamic Default Value = a session-variable expression resolving to the user's home location.

## Related

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Customer Field</strong></td><td>For customer-record fields rather than transaction fields.</td><td><a href="/pages/m5MMxXDarblfJTJgKX3n">/pages/m5MMxXDarblfJTJgKX3n</a></td></tr><tr><td><strong>Location</strong></td><td>The dedicated location-picker block.</td><td><a href="/pages/2xi1YavZVYPvEm8hdnvF">/pages/2xi1YavZVYPvEm8hdnvF</a></td></tr><tr><td><strong>Module Variables</strong></td><td>Source values for Dynamic Default expressions.</td><td><a href="/pages/S9QlmvCWJ8AOsDrFpQtz">/pages/S9QlmvCWJ8AOsDrFpQtz</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.in8sync.com/client-admin-guide/active-workflows/getting-started/transaction-components/record-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
