# Record Detail

## Overview

The Record Detail component is designed to work with *one* Salesforce record at a time. Key features include:

* **Multiple Layout Options:** Display fields using standard Salesforce layouts (Compact or Full).
* **View and Edit Modes:** Control whether the fields are read-only or editable.
* **Required Fields:** Mark specific fields as required (when in edit mode).
* **Data Binding:** The component automatically fetches and displays the record data based on a provided Record ID.
* **Saving Changes:** To save changes to Salesforce, use the interactions tab. [Learn more](/dynamic-components/tutorials/components/record-detail/saving-changes.md).
* **Conditional Visibility:** The component supports conditional visibility.

## Configuring the Record Detail Component

Select the Record Detail component on the canvas to access its properties in the Properties Panel.

### Properties

These properties *must* be configured for the component to function:

* **API Name:** (Text) A unique identifier for this component instance (e.g., `AccountDetail`, `ContactDetail`).
* **Object API Name:** (Text) The API name of the Salesforce object you want to display (e.g., `Account`, `Contact`, `My_Custom_Object__c`). This determines which object's fields are available.
* **Record ID:** (Text) The 15 or 18-character ID of the *specific record* you want to display.
  * **On Record Pages:** If your Dynamic Component is on a record page, you'll almost always bind this to a record variable or use the `$Component` attribute if you have configured any [Target Object Page](/dynamic-components/core-concepts/target-page-object.md) in your Dynamic Component.
  * **Other Contexts:** You can also bind the Record ID to a Variable resource (e.g., if you're getting the ID from a URL parameter or from another component).

### Layout Options

* **Layout Type:** (Text - Select from options) Choose how the fields should be displayed:
  * `Compact`: Uses the object's *compact layout* (defined in Salesforce Setup). This is a concise, pre-defined set of fields.
  * `Full`: Uses the object's *page layout* (defined in Salesforce Setup). This shows all fields included in the page layout.

{% hint style="warning" %}
**The Custom View feature** is not available at this time. We plan to include it in a future update
{% endhint %}

### Display Mode

* **Mode:** (Text - Select from options) Determines whether the fields are editable or read-only:
  * `View`: Fields are displayed as read-only. Users cannot modify the data directly within the component. You can optionally enable *inline editing* (see below).
  * `Edit`: Fields are displayed as editable input fields. Users can directly modify the data.
* **Inline Edit**:(Boolean) Enable inline edition when the mode is set to View.

### Saving Changes (Interactions)

The Record Detail component itself *does not automatically save changes* back to Salesforce. You need to add an *interaction* to handle saving.&#x20;

This is typically done with an interaction

{% content-ref url="/pages/DUDaYN6UIAg727W8dJ9E" %}
[Saving Changes](/dynamic-components/tutorials/components/record-detail/saving-changes.md)
{% endcontent-ref %}


---

# 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.avonnicomponents.com/dynamic-components/components/record-detail.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.
