> For the complete documentation index, see [llms.txt](https://docs.gridmate.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gridmate.io/product-tour/records/record-layout.md).

# Record Layout

Display a record or a related parent record with a JSON layout and record actions.

GridMate provides a lightning component **GM - Record Layout** to display record details or any related parent using a layout configuration.

In this tutorial, we will configure the **GM - Record Layout** component to display the sponsor details on the Opportunity page.

{% stepper %}
{% step %}

### Open the page

Select an opportunity record and edit the page in the Lightning App Builder.
{% endstep %}

{% step %}

### Add the component

From the components list, drag and drop the component **GM - Record Layout**. The component is now ready for configuration in the Lightning App Builder.
{% endstep %}

{% step %}

### Configure the properties

To perform a quick configuration, populate the required property values in the table below.
{% endstep %}
{% endstepper %}

## Properties

| Property        | Demo value       | Notes                                               |
| --------------- | ---------------- | --------------------------------------------------- |
| Object Name     | **Contact**      |                                                     |
| Record Id Field | **Sponsor\_\_c** |                                                     |
| Show Border     | **Checked**      |                                                     |
| Record Layout   |                  | See [Layout Configuration](#layout-configuration)   |
| Record Actions  |                  | See [Actions Configuration](#actions-configuration) |

Below is a step by step tutorial to configure the **GM - Record Layout** component.

{% embed url="<https://youtu.be/PZ7qloBWR8o>" %}

{% hint style="info" %}
To display information based on the related record, ensure that those fields are displayed on a separate GM - Record Layout.
{% endhint %}

## Layout Configuration

{% code lineNumbers="true" %}

```json
{
    "sections": [
        {
            "name": "contactInformation",
            "label": "Contact Information",
            "active": true,
            "cols": 3,
            "rows": [
                [{"apiName": "Name"}],
                [
                    {"apiName": "ReportsToId"},
                    {"apiName": "MailingStreet"},
                    {
                        "apiName": "MailingCountry",
                        "coloring": [
                            {
                                "color": "#a6f79e",
                                "exp": {
                                    "MailingCountry": {
                                        "operator": "=",
                                        "value": "USA"
                                    }
                                }
                            }
                        ]
                    }
                ],
                [
                    {
                        "apiName": "MailingCity",
                        "autocomplete": [
                            "Paris",
                            "New York",
                            "London",
                            "Rome"
                        ],
                        "noWhitespace": true
                    }
                ],
                [
                    {"apiName": "OwnerId"},
                    {"apiName": "LeadSource"},
                    {
                        "apiName": "Title",
                        "readOnly": {
                            "Title": {
                                "operator": "in",
                                "value": ["Other"]
                            }
                        }
                    }
                ],
                [
                    {"apiName": "Level__c"},
                    {"apiName": "CLevel__c"}
                ],
                [
                    {
                        "apiName": "Salary__c",
                        "required": false
                    }
                ],
                [
                    {
                        "apiName": "CreatedById",
                        "noWhitespace": true
                    }
                ],
                [
                    {
                        "apiName": "LastModifiedById",
                        "noWhitespace": true
                    }
                ],
                [
                    {
                        "apiName": "Notes__c",
                        "noWhitespace": true
                    }
                ],
                [
                    {
                        "apiName": "RecordTypeId",
                        "noWhitespace": true
                    }
                ]
            ]
        }
    ]
}
```

{% endcode %}

## Actions Configuration

{% code lineNumbers="true" %}

```json
[
    {
        "name": "Contact.Update_Status",
        "icon": "utility:close",
        "label": "Status",
        "visibility": {
            "Approval_Status__c": {
                "operator": "!=",
                "value": "Accepted"
            }
        }
    },
    {
        "label": "Open",
        "name": "open",
        "icon": "utility:new_window",
        "event": {
            "name": "e.force:navigateToSObject",
            "params": {}
        }
    }
]
```

{% endcode %}

## Next steps

<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>GM - Record Layout</strong></td><td>Every property of the component.</td><td><a href="https://docs.gridmate.io/package-reference/components-library/records/gm-record-layout.md">GM - Record Layout</a></td></tr><tr><td><strong>Record Layout (LWC)</strong></td><td>Build multi-column record layouts with dynamic forms, coloring and edit modes.</td><td><a href="https://docs.gridmate.io/product-tour/records/record-layout-lwc.md">Record Layout (LWC)</a></td></tr><tr><td><strong>Record KPI</strong></td><td>Show currency and percentage fields as KPI rings inside a record layout.</td><td><a href="https://docs.gridmate.io/product-tour/records/record-kpi.md">Record KPI</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.gridmate.io/product-tour/records/record-layout.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
