Help Center
  • What is GridMate
  • 📌Getting Started
    • Package Setup
    • Appexchange
  • 🎬Product Tour
    • Related List Grid
    • Parent Related List Grid
    • List View Grid
    • Kanban List View Grid
    • Field Set Grid
    • User Grid
    • Pivot Grid
    • Report Table
    • Multi Calendar
    • Object Timeline
    • File Explorer
    • Record Layout
    • Record KPI
    • Field Path
    • Map Record
    • Map List
    • Utility Bar Grid
    • Record App Switcher
    • Flow Grids
    • Compact Calendar
  • 🚀Advanced Guides
    • Grid - Advanced Configuration
    • Grid - Mass/Record Actions
    • Grid - Advanced Filtering
    • Grid - Inline Components
    • Grid - Mass Edit Button
    • Grid - Enhanced Filter Builder
    • Grid - Data Import Wizard
    • Grid - Dynamic Formula Field
    • Grid - Grid Explorer
    • Grid - Dynamic Interaction
    • Grid - Dynamic FieldSet Grid
    • Grid - Dynamic Record Card
    • Grid - Custom Action
    • Grid - Interactive Filters
    • Grid - Bulk Action
    • Grid - Custom Inline Component
    • Grid - Config Checker
    • Grid - Admin Cockpit
    • User Grid - Split View
    • User Grid - Data Filtering
    • User Grid - Deployment Process
    • Map List - Search Around Setup
    • Salesforce Classic Setup
  • 📦Package Reference
    • Components Library
      • GM - RelatedList Grid
      • GM - FieldSet Grid
      • GM - ListView Grid
      • GM - FieldSet Kanban
      • GM - ListView Kanban
      • GM - Parent RelatedList Grid
      • GM - RelatedList Tabs
      • GM - RelatedList Accordion
      • GM - RelatedList Cards
      • GM - Record Layout
      • GM - Record Layout (LWC)
      • GM - Record Card
      • GM - Dynamic Tabs
      • GM - Dynamic Accordion
      • GM - Flow Layout
      • GM - Field Path
      • GM - Multi Calendar
      • GM - FieldSet Pivot
      • GM - Flow View Grid
      • GM - Flow Edit Grid
      • GM - Record App Switcher
      • GM - Map Record
      • GM - Map List
      • GM - Report Table
      • GM - Object Timeline
      • GM - User Grid
      • GM - File Explorer
      • GM - Dynamic FieldSet Grid
      • GM - Dynamic Record Card
      • GM - User Grid Split View
      • GM - Compact Calendar
      • GM - Interaction Logger
    • Javascript Formulas
    • DataGrid Settings
  • Tools
    • SF Cli Plugin
    • Chrome Extension
  • 📬TROUBLESHOOTING
    • ⚙️Config Snippets
      • Layout - basic setup
      • Layout with read only field
      • Layout with field visibility
      • Layout with section visibility
      • Layout with autocomplete
      • Inline FieldSet Grid
      • Inline RelatedList Grid
      • Inline Record Layout
      • Inline Chatter Feed
      • Multiple Inline Components
      • Calendar - Extra Activities
      • Field Path Stages
      • Dynamic Tabs
      • Compact Calendar
      • Object Timeline
    • ❓FAQ
  • 📋Release Notes
Powered by GitBook

Links

  • Appexchange
  • Pricing
  • Solution

Social

  • Youtube
  • LinkedIn
  • X

2025 GridMate

On this page
  • Documentation
  • Specification
  • Record Layout Schema
  • Configuration Examples
  • API Reference

Was this helpful?

  1. Package Reference
  2. Components Library

GM - Record Layout

(gmpkg:RecordLayoutComponent)

PreviousGM - RelatedList CardsNextGM - Record Layout (LWC)

Last updated 10 months ago

Was this helpful?

Documentation

GM - Record Layout component is used to display a related object using a layout configuration. The related object could be at any level. You can configure this component to display sections and define also their visibilities.

Use case: Display the ultimate account details on the contact page with different sections and of course more than 2 columns!

Specification

Property
Type
Description

Object Name *

String

The name of the related object to display.

Record Id Field *

String

The name of the lookup field to display. If you want to display an account card from the contact page, set this property to AccountId.If the record layout displays the current object, set this field to recordId.

Record Layout *

String

Record Actions

String

Record actions to apply. You can leverage your existing quick actions.

An action has these properties:

  • name: the name of the action.

  • label: the label of the action

  • icon: the icon to display. Only utility:* icons are supported

  • visibility: visibility condition for the action same as for a section.

Show Actions as Buttons

Boolean

Check this option if you wish to display actions as buttons instead of icons.

When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.

Visible Actions

Integer

Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course.

The remaining custom actions will be added as an option on the button menu.

Record Layout Schema

Each section contains a list of rows. A section could have a visibility condition that can evaluate all the properties of the targeted record(see example below).

A section has these properties:

  • name: the name of the section. It should be unique

  • label: the title of the section

  • active: a flag to activate the section or not. Set this field to always to keep the section always active

  • cols: # of columns to display.

  • visibility: visibility JSON condition. It should be built it the same way as Read-only Fields

  • visibilityFormula: Visibility Javascript condition. Using a formula is useful to compare fields instead of using static value. See .

  • readOnly: Read-only JSON condition. It should be built it the same way asRead-only Fields. If the section is read-only, all its fields will be read-only as well

  • readOnlyFormula: Read-Only Javascript condition. Using a formula is useful to compare fields instead of using static value. See .

  • rows: the list of rows. Each row is a list of fields or blocks to display

Each row contains a list of fields or an empty block. Each field can be displayed in a read-only using a condition that can evaluate all the properties of the targeted record (see example below).

A field has these properties:

  • apiName: the API name of the field.

  • colSize: the width of the component

  • noWhitespace: flag to remove white space

  • emtyBlock: An empty block ({"emtyBlock": true}) can be used to align to the displayed fields

  • coloring: Conditions for coloring. You can define the coloring and the corresponding condition same as Cell Coloring for Grids.

    [
        {
            "color": "#a6f79e",
            "exp": {
                "MailingCity": {
                    "operator": "=",
                    "value": "Paris"
                }
            }
        }
    ]
  • managedComponent: set to true if you want to use a custom component to display the field.

  • componentDef: Custom component to use for the managed field. This property is a JSON object containing the component name and attributes.

We can also override the density of the record layout using the density property (see example below). This property could be set to "auto" | "compact" | "compact"

Parent fields can be used for Visibility and ReadOnly conditions. See the example below:

{
    "sections": [
        {
            "name": "ssnInformation",
            "label": "SSN",
            "active": true,
            "cols": 1,
            "rows": [               
                [
                    {
                        "apiName": "SSN__c",
                        "visibility": {
                            "Account.BillingCountry": {
                                "operator": "=",
                                "value": "USA"
                            }
                        }
                    }
                ]
            ]
        }
    ]
}

Configuration Examples

API Reference

<design:component label="GM - Record Layout">    
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Use it only for community"/>        
    <design:attribute name="targetObjName" label="Object Name" 
                      description="Object Name to load"/>    
    <design:attribute name="recordIdField" label="Record Id Field" 
                      description="Record Id Field to load" />
    <design:attribute name="recordLayout" label="Record Layout" 
                      description="JSON Record Layout"/>    
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show record card border"/>
    
    <design:attribute name="recordActions" label="Record Actions" 
                      description="JSON Record Actions"/>        
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Visible Actions" 
                      description="# of visible actions"/> 
</design:component>

The record layout is a way to describe the sections and the visibility of each section using a JSON format. See

The configuration wizard can be used to build the list of actions. See

readOnly: Read-only condition. It should be built it the same way asRead-only Fields

readOnlyFormula: Read-Only Javascript condition. Using a formula is useful to compare fields instead of using static value. See .

visibility: visibility condition. It should be built it the same way asRead-only Fields

visibilityFormula: Visibility Javascript condition. Using a formula is useful to compare fields instead of using static value. See .

📦
Javascript Formulas
Javascript Formulas
Javascript Formulas
Javascript Formulas
Layout - basic setup
Layout with section visibility
Layout with field visibility
Layout with read only field
Actions Configuration
Record Layout Schema