# What is GridMate

GridMate components can be tailored to suit the requirements of the end-user to enhance and improve their user experience and productivity. We provide a set of components and quick actions for the end-user to manipulate and process the data, these include CRUD operations, inline editing, filtering, sorting, data import/export, flows...&#x20;

Please check out the video below to have an overall idea👇🏻

{% embed url="<https://youtu.be/O-aqEKx7rxM>" %}

GridMate leverages org. metadata to display data from **related lists**, **list views,** **field sets** and **quick actions** from both standard and custom objects.&#x20;

GridMate components can be added to your lightning pages(**Home**, **App**, **Record**) using the Lightning App Builder.


# Package Setup

## Installation procedure

The following sections outline the steps required to start to use the GridMate components on your Salesforce lightning pages. GridMate is available to install from the Salesforce [AppExchange](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000G0raZUAR).

{% hint style="info" %}
&#x20;Before installing from AppExchange it is recommended to follow any required recommendations for your particular Salesforce organization in relation to installing packages. Refer to the Salesforce documentation for more details - [Installing a package](https://help.salesforce.com/articleView?id=distribution_installing_packages.htm\&type=5)
{% endhint %}

1. Visit [GridMate Listing](https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000G0raZUAR) on the AppExchange
2. Click Get It Now and follow the instructions presented
3. Install GridMate for Admins only&#x20;
4. Click Done When installation has completed

After the installation has been completed, the following deployment steps are required.

{% hint style="info" %}
Users accessing the GridMate components also need to be assigned to a profile or a permission set that has been granted the permission ‘API enabled’. Refer to the Salesforce documentation for more details [Profiles](https://help.salesforce.com/articleView?id=admin_userprofiles.htm\&type=5)
{% endhint %}

## Rest API Enablement

API Enabled should be checked in the permission (Profile or Permission Set) to use GM - RelatedList Grid/GM - ListView Grid. GridMate uses Rest API to fetch the metadata (Layout/ListView\...).

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MgFAYnKUcjBMnyWk05j%2F-MgHqLX3g6RPvKGcNCHA%2Fimage_gitbook.png?alt=media\&token=8fadfe8d-e633-423e-a3d2-86980819fa82)

## Permission Set Assignment

Each GridMate user should have GridMate User Permission Set. This Permission Set grants all the needed permissions to see and use GridMate components.&#x20;

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

## Package License Assignment

Each GridMate user should have a license assigned as explained in the video below.  The license assignment is available only for production org.

{% embed url="<https://youtu.be/Af3K-Nd2bqs>" %} <br>
{% endembed %}


# Related List Grid

GridMate provides a lightning grid component **GM - RelatedList Grid** to display related lists with advanced features and bypass Salesforce standard UI limitations like the number of columns and rows.&#x20;

In this tutorial, we will configure **GM - RelatedList Grid** component by showing how to add it to a lightning page, viewing the related records and inline edit them.&#x20;

{% hint style="warning" %}
GM - RelatedList Grid can be used for Lookup and Master-Detail Relations
{% endhint %}

{% hint style="warning" %}
GM - Related List Grid may not function on Gov Cloud due to restrictions from Salesforce. You are recommended to use a FieldSet Grid or a UserGrid to replicate the Related List
{% endhint %}

1. Select an Account record and edit the page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM - RelatedList Grid**.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the data grid to the needs of the end-user.
5. To perform a quick configuration, populate the properties below:&#x20;
   * Related List Label : ***Opportunities***
   * Row Limit : 1**00**
   * Page Size : **50**
   * Custom Icon : ***standard:opportunity***
   * Grid Height : **480**
   * Show Border : ***Checked***
   * Show Column Border : ***Checked***
   * Show Record Details : **Checked**

{% hint style="info" %}
Related List Label should be the same label as on the layout. Otherwise the user will not be able to see the data.
{% endhint %}

Below is a step by step tutorial to configure the **GM - RelatedList Grid** component.

{% embed url="<https://youtu.be/VEWMRBtoQHU>" %}
GM - RelatedList Grid
{% endembed %}

## Open Split View by Default

**Open Split View by Default** is a feature that automatically opens Split View on your smart grids (GM Related List Grid, Parent Related List Grid, List View Grid, Field Set Grid, etc.) when the page is loaded or refreshed, enhancing your 360° experience.

1. Edit the page in **Lightning App Builder**.
2. Select **GM – Related List Grid** (or the relevant smart grid).
3. To perform a quick configuration, set the following property:
   * Auto Select 1st Row : **Checked.**
   * Open Split View : **Checked.**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FvasPrdnx7n5OMyJr9vxW%2FScreenshot%202026-01-29%20at%2017.58.15.png?alt=media&amp;token=15637ab2-0e8d-4902-8613-fac0c56c38e5" alt=""><figcaption></figcaption></figure>

After saving the configuration, Split View will automatically open on the smart grid when the page is loaded or refreshed.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FWFWwKtjn7CgXfvHqNe3q%2FScreenshot%202026-01-29%20at%2018.01.25.png?alt=media&amp;token=448a875c-ee4b-490c-a27e-60db37989317" alt=""><figcaption></figcaption></figure>


# Parent Related List Grid

GridMate provides a lightning grid component **GM - Parent RelatedList Grid** to display a grid of Parent object with advanced features and bypass Salesforce standard UI limitations like the number of columns and rows.

In this tutorial, we will configure **GM - Parent RelatedList Grid .**

1. Select an opportunity record and edit the page in the Lightning App Builder.
2. From the components list, search for **GM - Parent RelatedList Grid**.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the data grid to the needs of the end-user.
5. To perform a quick configuration, populate the properties below :&#x20;
   * Object Name : **Account**
   * Record Id Field : **AccountId**
   * Related list label : **Contacts**
   * Page Size : **15**
   * Custom Icon : **standard:Contact**
   * Show Border : **Checked**
   * Show Column Border : **Checked**
   * Show Record Details : **Checked**

Below is a step-by-step tutorial to configure the **GM - Parent RelatedList Grid** to display a grid of **Contacts** on the **Opportunity page**, based on the **Opportunity Account**.

{% embed url="<https://youtu.be/1wNA0yn2vl4>" %}
**GM - Parent RelatedList Grid**
{% endembed %}


# List View Grid

GridMate provides a lightning grid component **GM - ListView Grid** to display list views with advanced features and bypass Salesforce standard UI limitations like the number of columns and rows.&#x20;

In this tutorial, we will create an app page for account management using **GM - ListView Grid**.

1. From Setup, create an app page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM - ListView Grid**.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the data grid to the needs of the end-user.
5. To perform a quick configuration, populate required property values:&#x20;
   * Related Object Name : ***Account***
   * ListView Name : ***AllAccounts***
   * Row Limit : **500**
   * Page Size : **50**
   * Custom Icon : ***standard:account***
   * Grid Height : **9999**
   * Search Fields : **Name,BillingCity**
   * Wildcard Search : **Checked**
   * Show Border : ***Checked***
   * Show Column Border : ***Checked***

Below is a step by step tutorial to configure the **GM - ListView Grid** component.

{% embed url="<https://youtu.be/MhtpVKLX7Fo>" %}
GM - ListView Grid
{% endembed %}


# Kanban List View Grid

GridMate provides a lightning grid component **GM - Kanban List View Grid** to display a list of records using a specific ListView across a navigation path.

In this tutorial, we will create an app page for case management using **GM - Kanban List View Grid**.

1. From Setup, create an app page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM - Kanban List View Grid**.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the data grid to the needs of the end-user.
5. To perform a quick configuration, populate required property values:
   * Related Object Name : **Case**.
   * List View Name : **AllCases**.
   * Page Size : **50**.
   * Custom Icon : **standard:case**.
   * Show Border : **Checked**.
   * Show Column Border :**Checked**.
   * Show Record Details : **Checked**.
   * Kanban Stages : `[{"label":"Open","filter":{"Status":{"operator":"in","value":"('New')"}}},{"label":"On Hold","filter":{"Status":{"operator":"in","value":"('On Hold')"}}},{"label":"Closed","filter":{"Status":{"operator":"in","value":"('Closed')"}}}].`

Below is a step by step tutorial to configure the **GM - Kanban List View Grid** component.

{% embed url="<https://youtu.be/4a-M_J38vMU>" %}
GM - Kanban List View Grid
{% endembed %}

<br>


# Kanban Board

GridMate’s **Kanban Board** is designed to help users manage and visualize workflows by tracking progress and allowing quick updates directly within the page.&#x20;

In this tutorial, we will create an app page for opportunity Kanban Board using **GM - Kanban Board**.

1. From Setup, create an app page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM - Kanban Board**.
3. The component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the component to the needs of the end-user.
5. To perform a quick configuration, populate required property values:&#x20;
   * Custom Label : **Opp Pipeline Board**
   * Custom Icom : **standard:opportunity**
   * Object Name : **Opportunity**
   * Stage Field : **StageName**
   * Title Field : **Name**
   * Object Fields : **CloseDate,ExpectedRevenue,Amount**
   * Row Limit : **100**
   * Enable Create Object : **Checked**
   * Enable Update Object : **Checked**
   * Enable Mass Update : **Checked**
   * Enable Delete Object : **Checked**
   * Enable Mass Delete : **Checked**
6. Aggregate : `{ "Amount": "sum", "ExpectedRevenue": "sum" }`
7. actions : `[{"label":"Update Stage","name":"Opportunity.Update_Stage"}]`

Below is a step by step tutorial to configure the **GM - Kanban Board**.

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

{% hint style="info" %}
The Kanban Board supports **card coloring** by providing the coloring configuration. Below is an example of card coloring.
{% endhint %}

```json
[
    {
        "color": "#ffc9c9",
        "exp": {
            "Amount": {
                "operator": "<=",
                "value": 10000
            }
        }
    },
    {
        "color": "#D2FFBF",
        "exp": {
            "Amount": {
                "operator": ">",
                "value": 10000
            }
        }
    }
]
```

{% hint style="info" %}
[Mass/Record action](https://docs.gridmate.io/advanced-guides/actions-library) can be configured based on requirement. We support quick action and calling a flow.
{% endhint %}

## Kanban Board - State Changes Control

This feature that allows admins to define interactive behaviors when a record is moved between stages in the Kanban Board.

Stage States can trigger different user interactions during stage updates, such as:

* Displaying confirmation messages
* Opening record modals

#### Use Case

* When an Opportunity is moved to **Closed Lost**, a confirmation message is displayed to ensure the user intends to close the deal.
* When the stage is updated to **Negotiation/Review**, a record modal opens and requires the user to complete additional fields, such as **Amount**, before the update is finalized.

Below is the JSON Config configured for the demo.

```json
[
    {
        "toStage": "Closed Lost",
        "type": "confirm",
        "message": "Do you want to close this opps"
    },
    {
        "toStage": "Negotiation/Review",
        "type": "recordModal",
        "fields": [
            "Amount"
        ]
    }
]
```

Below is a step by step tutorial to configure the **Kanban Board - State Changes Control** component.

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


# Field Set Grid

GridMate provides a lightning grid component **GM -  FieldSet Grid** to display list of records with advanced features and bypass Salesforce standard UI limitations like the number of columns, number rows and displaying parent fields without writing formulas.&#x20;

In this tutorial, we will create a grid of contacts using **GM - FieldSet Grid** to bypass the Account Contact Relationship. With this grid, we will get an instant access to the contact records.&#x20;

1. Open the contact object in the object manager.
2. Add a FieldSet (**GM&#x20;*****ACR FieldSet***) with the right fields to display including parent fields.
3. Go to an account record and edit the page in the app builder.
4. From the components list, drag and drop the component **GM - FieldSet Grid**.
5. The grid component is now ready for configuration in the Lightning App Builder.
6. The property values can be configured to tailor the data grid to the needs of the end-user.
7. To perform a quick configuration, populate required property values:&#x20;
   * Related Object Name : ***Contact***
   * FieldSet Name : **GM\_*****ACR\_FieldSet***
   * Custom Label : ***Contacts***
   * Row Limit : **100**
   * Page Size : **50**
   * Grid Height : **480**
   * Filter : **`{"Id":{"operator":"in","value":"SELECT ContactId FROM AccountContactRelation WHERE AccountId=$$recordId$"}}`**
   * Search Fields : **FirstName,LastName,Title**
   * Wildcard Search : **Checked**
   * Show Border : ***Checked***
   * Show Column Border : ***Checked***

Below is a step by step tutorial to configure the **GM - FieldSet Grid** component..

{% embed url="<https://youtu.be/uRVs0UP7Uas>" %}
**GM - FieldSet Grid**
{% endembed %}


# User Grid

As a Salesforce User, GridMate provides a powerful solution with the User Grid component. It offers customizable grids with powerful features:

* Efficient data filtering and sorting,
* Record grouping,
* Layout customization,
* Actions on multiple records,
* Formula field creation,
* Inline Editing
* Import/Export
* ...and much more

This comprehensive tool enhances data management and productivity, empowering users to effectively organize and manipulate their data (Standard/Custom Object), and all this just by configuration!

## Enable User Grid Feature

To enable **User Grid** feature, simply navigate to your account settings and follow these steps:

* Go to advanced user details,
* Click on permission set assignments,
* Select GridMate Advanced User permission set

You are ready to start using the GridMate User Grid and enjoy all its benefits.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FteP2SnPNHDCPcduLa8Li%2FScreenshot%202023-05-09%20at%2019.24.22.png?alt=media&#x26;token=830375bd-6741-4761-8f2f-ce70c3ff3307" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F02FPaFcdJQO3nGT6vXfX%2FScreenshot%202023-05-09%20at%2019.24.45.png?alt=media&#x26;token=d5cd3307-1eff-402b-a26c-8ce8e4a0370a" alt=""><figcaption></figcaption></figure>

## User Grid Setup

Once you have enabled the **User Grid** feature, you can start creating your User Grid Component. The following video provides a step-by-step tutorial:point\_down:**.**

{% embed url="<https://youtu.be/kWR2K4wqRFE>" %}
User Grid
{% endembed %}

## Columns Renaming

**Columns Renaming** is a feature giving the ability to easily modify the column labels. The renaming labels is useful when using parent fields or labels are too long to display. Below is a step by step tutorial on how to use the **GM - Columns Renaming** feature👇.

{% embed url="<https://youtu.be/KoBYLKPcbTg>" %}
Column Renaming
{% endembed %}

## Admin Filter

GridMate provides an **Admin Filter** that can be created to limit the scope for a given **User Grid**. When an admin filter is defined, the user will never be able to go beyond that scope. Below is a step by step tutorial on how to use the **Admin Filter** feature �&#xDC47;**.**

{% embed url="<https://youtu.be/BViBshtqItw>" %}
Admin Filter
{% endembed %}

## Grid Explorer

In some scenarios, we want users to customize the configuration without impacting the one made by the grid owner. With the new version, admins can enable **Grid Explorer** for **User Grid**(s) through the **Grid Explorer.**

Read-only users will be able to customize the grid settings including columns, filters, sort and grouping. They can also reset their configuration to the original, using a reset action.

Below is a step by step tutorial on how to enable the **Grid Explorer** for **User Grid**(s) and use the Rest action�&#xDC47;**.**

{% embed url="<https://youtu.be/6aqjTpB1b4s>" %}
Grid Explorer
{% endembed %}

{% hint style="info" %}
The Quick Filter supports **only** the following field types: Boolean, Currency, Double, Integer, Percent, Date, Datetime, Picklist, Multi-Picklist, String, and Reference.
{% endhint %}

## Inline Components

Configuring **Inline Components** is now available through the **Config Wiz.** We can easily create **master-detail** views using both GridMate and custom components. Below is a step by step tutorial on how to configure **Inline Components** 👇.

{% embed url="<https://youtu.be/4ogOIUC0jEI>" %}
Inline Components
{% endembed %}

## Hidden Columns

Configuring **Hidden Columns** is now available through the **Config Wiz.** We can set the **Hidden Columns** from the grid. Below is a step by step tutorial on how to configure the **Hidden Columns** 👇.

{% embed url="<https://youtu.be/mjmsLt4taDE>" %}
Hidden Columns
{% endembed %}

## Default Values

Configuring **Default Values** is now available through the **Config Wiz**. This reduces the risk of errors when creating a new record by providing **Default Values**. Below is a step by step tutorial on how to define **Default Values** 👇.

{% embed url="<https://youtu.be/VRZ1_AYvZFI>" %}
Default Values
{% endembed %}

{% hint style="info" %}
To use the page layout when creating a new record, check ***"Use the page layout when creating a new record"*** checkbox.
{% endhint %}

## Hidden Fields

Configuring **Hidden Fields** is now possible through **Config Wiz,** allowing you to hide **Fields** when creating a new record. Below is a step by step tutorial on how to define **Hidden fields** 👇.

{% embed url="<https://youtu.be/VRZ1_AYvZFI?feature=shared&t=81>" %}
Hidden Fields
{% endembed %}

## Record Actions

Configuring **Record Actions** is now possible through the **Config Wiz**. You can configure custom actions accessible from the record (quick action, custom component, flow). Below is a step by step tutorial on how to define **Record Actions**👇.

{% embed url="<https://youtu.be/aak_BjjptKA>" %}
Record Actions
{% endembed %}

## Object Access

With this new version, you can also switch actions **on** or **off** at the grid level:

* Mass Create
* Mass Clone
* Mass Update
* Mass Delete
* Modal Create
* Modal Edit
* Inline Create
* Inline Edit
* Inline Delete

All actions above are driven from the logged user access (CRUD access). We can override this behavior through the **Config Wiz** by choosing to enable or disable it. Below is a step by step tutorial on how to override them👇.

{% embed url="<https://youtu.be/W5E6ntcZMU8>" %}
Object Access
{% endembed %}

## Grouping

Configuring **Grouping** is now possible through **Config Wiz,** To manage the **Grouping** and the **Level** of grouping. Below is a step by step tutorial on how to use the **Grouping** configuration section👇.

{% embed url="<https://youtu.be/UYdnPEfZFgs>" %}
Grouping
{% endembed %}

## Description

Defining the **Description** is now possible through **Config Wiz.** that allows you to effectively give guidance to end users. Below is a step by step tutorial on how to set the **Description** 👇.

{% embed url="<https://youtu.be/hLcf7bBe1Og>" %}
Description
{% endembed %}

## Miscellaneous

With this new version, you can also switch features on or off at the grid level:

* Pagination
* Interactive Filters
* Filter Links
* Import
* Export
* Auto Fill

All features above are defined at the **Org level**/**Profile**/**User** using [DataGrid Setting](/package-reference/grids-settings). We can override the behavior through the **Config Wiz** by choosing to enable or disable it. Below is a step by step tutorial on how to override them👇.

{% embed url="<https://youtu.be/iAiAj7fKh4I>" %}
Miscellaneous
{% endembed %}

{% hint style="info" %}
Pagination and Interactive Filters can be enabled together — the pages then navigate the filtered records. See [Interactive Filters](/advanced-guides/grid-interactive-filters#pagination).
{% endhint %}

## Lookup Options

**User Grid -** Lookup Options allow you to change the behavior of lookup fields. below is a step-by-step tutorial on how to use this feature 👇.

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

Below is the example of the lookup options used in the demo.

```coffeescript
{
    "AccountId": {
        "titleField": "Name",
        "subTitleField": "Type",
        "candidatesProvider": "CaseAccountLookupProvider",
        "pastedValueProvider": "CaseAccountLookupProvider",
        "refObjCreateable": true,
        "defaultValues": {
            "Type": "Customer",
            "Industry": "Communications",
            "CEO__c": "003Hs00005DU7njIAD"
        }
    }
}
```

For the complete details on Lookup Providers, go to [Lookup Providers](/package-reference/components-library/gm-relatedlist-grid#lookup-providers).

## Inline Label

**User Grid - Inline Label** lets you override component labels. Here is a step-by-step tutorial on how to use the feature to override the User Grid Label.👇.

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

{% hint style="warning" %}
The **Disable Refresh View** option of the **GM - User Grid** component hides the **Config. Wiz**. Leave it unchecked on the grid you want to configure — use it on inline grids that must not refresh the whole page after an update.
{% endhint %}

## Disable End User Filter

**Disable End User Filter** turns off the **Filter Builder**, which allows users to create complex filters using logical operators like AND/OR.

Below is a step by step tutorial on how to override them👇.

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

## Visible Actions

We’ve introduced **Visible Actions** for **User Grids**, allowing users to configure which actions are visible in the toolbar.\
This provides a cleaner interface and helps users focus on the actions that are most relevant to their workflow.

Below is a step-by-step tutorial on how to override these settings 👇.

{% embed url="<https://youtu.be/aZ2NGO9z-iI>" %}

## Charts

GridMate **Charts** feature allows you to go from raw data to clear visuals without ever leaving your **User Grid**.

Below is a step by step tutorial to configure the **Grid - Charts** 👇.

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

## Formulas

**Formulas** is a dynamic field feature that combines existing data fields and built-in functions to perform real-time calculations and display updated values automatically across the grid.

Below is a step-by-step tutorial on how to configure the **Formulas**👇.

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

## Sharing Settings

User Grids are stored as **GM - User Grid** records. Who can see and edit them is driven by the Salesforce **Sharing Settings** (Setup → Security → Sharing Settings → Organization-Wide Defaults).

| Option                | What the user sees                                                                                                           |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| **Private**           | Only their own User Grids, plus the ones shared with them through the **Share** action, sharing rules or the role hierarchy. |
| **Public Read Only**  | Every User Grid in the org. Only the owner can edit or delete it. Default for **GM - User Grid**.                            |
| **Public Read/Write** | Every User Grid in the org, editable by everyone.                                                                            |


# Pivot Grid

GridMate provides a component to display a collection of records as a Pivot Table. With GM - FieldSet Pivot, we can display time series records with the ability to summarise and edit the data.

In this tutorial, we will setup a pivot grid to visualize forecasts per opportunity per month. We created a custom object to store forecasts. The forecast object has a master-detail relation to the opportunity.&#x20;

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F7pnORKdUwu6hBYnd4JDM%2FScreenshot%202022-01-13%20at%2017.04.03.png?alt=media\&token=be41473b-a56a-4041-a164-79c3c3288909)

Also, An automation has been set to create the forecast records for each closed won opportunity. Below is a quick demo on how to configure the **GM - Pivot Grid** component.

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

{% hint style="info" %} <mark style="color:blue;">**X Columns**</mark> property contains the fields to build the columns of the grid. We put the date of the forecast in our case.

<mark style="color:blue;">**Y Columns**</mark> property contains the fields to build the row headers. In our example, we want to group our forecasts by Opportunity. Multiple fields could be used as row header.

<mark style="color:blue;">**Value Columns**</mark> property contains the fields to use as cells. Multiple fields could be used. In our example, we want to visualize the investment, the revenue and the net revenue.
{% endhint %}

{% hint style="success" %}
The Config. Wizard can be used to configure different properties like the sort, order and aggregation....
{% endhint %}

## **Custom Labels**

To configure **Custom Labels**.

1. Launch the Configuration Wizard and select the **Custom Labels** tab.
2. Step 1 - Select Fields. From the Available list select the field to be renamed.
3. Step 2 - Define Labels. Define the label for each selected field.
4. Step 3 - **Custom Labels** Configuration

The Custom Labels Configuration dialog displays the **Custom Labels** text.

&#x20;This value can be used to populate the **Custom Labels** property value of the GridMate component.

{% embed url="<https://youtu.be/piEEnCdG92k>" %}
Define Custom Labels
{% endembed %}

{% hint style="info" %}
To add helper text to fields:

* Click the gear icon and select **Setup**.
* Navigate to **Object Manager**, select the object (e.g., Forecast), and go to "Fields & Relationships."
* Find the field, click the **Edit**, scroll to **Help Text**, enter your text, and S**ave**.
  {% endhint %}

## Pagination  <a href="#search-property" id="search-property"></a>

**Pivot Grid Pagination** allows you to control how records are fetched and displayed by grouping related data at a higher level. By setting a ***paging field name***, you move up one level in the data hierarchy ensuring that related records are loaded together on the same page.

in this tutorial, we’ll set the **paging field name** to **"opportunity\_\_c"**. This ensures that all forecasts related to a single opportunity are displayed together on the same page.

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

Below is an example of the ***Paging Filter.***

```coffeescript
{
    "and": [
        {
            "AccountId": {
                "operator": "=",
                "value": "$recordId"
            }
        }
    ]
}
```

## **Search** <a href="#search-property" id="search-property"></a>

To configure the **Search Fields** properties.

1. Edit the Lightning page in the App Builder.
2. Scroll down until you see **Search Fields**.
3. Select **Search** **Field**(**s**). From the Available fields which are searchable, for example Text, PickList, Phone, Email, URL .

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FD6lidXn4xb0QlKJWQjzv%2FScreenshot%202025-06-25%20at%2019.32.21.png?alt=media&amp;token=58f70ccd-f0e1-4eb4-927d-63df1e04b61d" alt=""><figcaption><p>GridMate - Pivot Grid - Search</p></figcaption></figure>

&#x20;Below is a step by step tutorial to configure the **GridMate - Pivot grid** **Search property** feature.

{% embed url="<https://youtu.be/kRzQmm2Ns6Q>" %}
Pivot Grid - Search
{% endembed %}

## Inline Cell Edit

To configure the **Inline Cell Edit** properties.

1. Edit the Lightning page in the App Builder.
2. Scroll down until you see **Enable Cell Edit** and check the box.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FhY3jmqFYRZfx8fDtHs4M%2FScreenshot%202025-07-23%20at%2013.13.53.png?alt=media&amp;token=6db7d964-7604-4862-bd52-c9ee9c2dda75" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
When **Inline Cell Edit** is enabled, End User will be able to edit Y Columns as well.
{% endhint %}

&#x20;Below is a step by step tutorial to configure the **GridMate - Inline Cell Edit** feature.

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


# Report Table

**GM - Report Table** is a powerful GridMate component that allows users to embed **Salesforce reports** including **Tabular**, **Summarized**, and **Matrix** formats directly onto any **Lightning page** (Home, App, or Record page). With support for advanced features like **row and column groupings**, **grand totals**, and **custom display options**, it offers a highly **interactive** and **configurable** way to surface business critical data.

By default, Salesforce Lightning only supports displaying **report charts**, not raw tabular data. **GridMate fills this gap** by enabling users to view full report tables directly in the Lightning Experience, empowering teams to make data driven decisions faster and more efficiently.<br>

In this tutorial, we will setup **GM - Report Table** component to display an  Opportunity summarized report on a home page . Below is a quick demo on how to configure it 👇.

{% embed url="<https://youtu.be/mhLOHI8zjF8>" %}
GRIDMATE - REPORT TABLE
{% endembed %}

{% hint style="success" %}
If the component is used on a record page, the report can be filtered on the current record Id using **Filter** property.&#x20;

Below is an example to filter opportunities report based on the current account.&#x20;

{ "ACCOUNT\_ID": { "value": "$recordId" } }
{% endhint %}

👋 **Note** that Salesforce Reports doesn't always use the field API name for filtering. You can find the field name to use  by following the instructions below.

Execute the code bellow using the [Executing Anonymous Apex Code](https://help.salesforce.com/s/articleView?id=sf.code_dev_console_execute_anonymous.htm\&type=5) :point\_down:

```java
Report r = [
    SELECT Id, Name, DeveloperName
    FROM Report
    WHERE DeveloperName = ${Developer_Name}
    Limit 1
];

Reports.ReportMetadata reportMetadata = Reports.ReportManager.describeReport(r.Id).getReportMetadata();

System.debug(JSON.serialize(reportMetadata));
```

In our example Developer Name = '**Closed\_Opportunities\_ode**'

For better vision, copy the JSON **log** into the[ GridMate playground](https://gridpal.my.site.com/s/playground) and you will find the columns on the **reportFilters** attribute.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FhsjYjmlGaCkXkriwz0T0%2FScreenshot%202023-12-13%20at%2011.45.03.png?alt=media&amp;token=686bb900-8fb5-417f-b596-c552f9bc219d" alt=""><figcaption></figcaption></figure>

## Matrix Report

In this tutorial, we will setup **GM - Report Table** component to display an Opportunity Matrix report on the opportunity record page. Below is a quick demo on how to configure it 👇.

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


# Multi Calendar

GridMate provides a component to calendar any object. It displays horizontal time-axis and resources to assign as rows. Activities can be created, edited or deleted. It supports also drag & drop like any calendar app.

In this tutorial, we will setup a Multi Calendar to visualize building inspections assigned to a list of technicians (contacts).

## General Configuration

Let's configure the general settings of our calendar.

{% embed url="<https://youtu.be/30H2ETk9HVM>" %}
Multi Calendar - General Configuration
{% endembed %}

{% hint style="success" %}
Set the height to 9999 to have a responsive height.
{% endhint %}

{% hint style="info" %}
If **Skip Night Hours** is checked, the user will be redirected to the next/previous day when clicking on Next/Previous button.
{% endhint %}

{% hint style="info" %}
Set the style to define the width of the assignee column and the activity cell as below:

cell-min-width:**${cell\_width}**;col-header-width:**${header\_width}**;

Example

cell-min-width:**10rem**;col-header-width:**10rem**;

The cell width is interesting when the calendar is displayed in a small area especially with the monthly view.
{% endhint %}

## Assignee Configuration

Let's configure the assignee settings. Note that the assignee could be any object (Standard or custom). It will be **Contact** in our case.

{% embed url="<https://youtu.be/51OeBzmh7ao>" %}
Multi Calendar - Assignee Configuration
{% endembed %}

{% hint style="info" %}
By default the list of assignee will be fetched using the list view configured on **Assignee ListView** property. If you want to switch between a specific set of teams, you can set a subset of listViews in the **Assignee Listview(s)** property like: **All\_Technicians,Plumbing**

The property should be populated using ',' separated list of API ListView names. If the property is empty, the user will see all available list views.
{% endhint %}

{% hint style="info" %}
The popover fields is ',' separated list of field API name. Those fields are used to display the popover when the user hover an assignee. If the property is empty, the compact layout will be used instead.
{% endhint %}

## Activity Configuration

Let's configure the activity settings. Note that the activity object could be any object (Standard or custom). It will be **Inspection\_\_c** in our case.

{% embed url="<https://youtu.be/7cYuUf3wovY>" %}
General Configuration - Activity Configuration
{% endembed %}

{% hint style="warning" %}
The **Activity From** and **To Date** fields must be DateTime.
{% endhint %}

{% hint style="info" %}
JSON string can be used to initialize brand new records. We support defaulting the activity dates and the assignee based on the selected cell. Below is an example to default our event.
{% endhint %}

```coffeescript
{
   "WhoId": "$userId",
   "StartDateTime": "$fromTime",
   "ActivityDate": "$fromDate"
}
```

{% hint style="info" %}
Multi Calendar supports cell coloring by providing the coloring configuration same as smart grids. Below is an example of coloring.
{% endhint %}

```coffeescript
[
    {
        "color": "#f4fe7abf",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Planned"
            }
        }
    },
    {
        "color": "#CFEBFE",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "In Progress"
            }
        }
    },
    {
        "color": "#8cedbb",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Completed"
            }
        }
    }
]
```

{% hint style="success" %}
Activities are filtered based on the list of displayed assignee. The calendar supports also extra filtering by providing a list view or a JSON filter.
{% endhint %}

{% hint style="info" %}
[Mass/Record action](/advanced-guides/actions-library) can be configured based on requirement. We support quick actions or call a flow actions.
{% endhint %}

Below is a quick demo of the final version of our Multi Calendar.

{% embed url="<https://youtu.be/HK7JYM1Bs_g>" %}
General Configuration - demo
{% endembed %}

## Toggle Full Screen

This feature allows users to expand the calendar view to fill the entire screen. This enhances visibility and focus on scheduled events by removing surrounding interface elements and minimizing distractions.

Enabling the Toggle Full Screen feature allows you to switch your Calendar to fullscreen mode for a more focused view.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F17l8bJqA0Co44jlABzCu%2FScreenshot%202025-07-04%20at%2011.19.50.png?alt=media&#x26;token=c721603f-2ca5-4484-9121-d26a92aa03d8" alt=""><figcaption></figcaption></figure>

Below is a quick demo on how to set up the toggle for fullscreen on our Multi-Calendar.

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

## Quarterly View

The newly introduced **Quarterly View** in GridMate's Multi-Calendar provides a three-month timeline to enhance visibility across calendars.

Here is a quick demo on using the **Quarterly View** in our Multi-Calendar.

{% embed url="<https://youtu.be/ztGAVxC4-A0>" %}

## 2 Weeks View

The **2 Weeks View** displays a rolling 14-day period starting on the configured **Week Start Day**. **Previous** and **Next** move the calendar a full two-week period, which makes it a natural fit for bi-weekly planning such as pay periods.

Enable it by checking **Enable 2 Weeks View** in the Lightning App Builder: **2 Weeks** is then added to the view switcher between **Weekly** and **Monthly**. Set **Default View** to `biweekly` to open the calendar on this view.

## Aggregation

Aggregation simplifies complex datasets by applying functions like sum, average, count, and group-by to consolidate raw data into meaningful summaries.

Below is an example of how **aggregation** is used.

```coffeescript
{
    "Time_Spent__c": "sum"
}
```

Below is a quick demo on how to set up the **Aggregation** in our **Multi Calendar**.

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

GridMate provides a component to calendar any object. It displays horizontal time-axis and resources to assign as rows. Activities can be created, edited or deleted. It supports also drag & drop like any calendar app.

In this tutorial, we will setup a Multi Calendar to visualize building inspections assigned to a list of technicians (contacts).

## General Configuration

Let's configure the general settings of our calendar.

{% embed url="<https://youtu.be/30H2ETk9HVM>" %}
Multi Calendar - General Configuration
{% endembed %}

{% hint style="success" %}
Set the height to 9999 to have a responsive height.
{% endhint %}

{% hint style="info" %}
If **Skip Night Hours** is checked, the user will be redirected to the next/previous day when clicking on Next/Previous button.
{% endhint %}

{% hint style="info" %}
Set the style to define the width of the assignee column and the activity cell as below:

cell-min-width:**${cell\_width}**;col-header-width:**${header\_width}**;

Example

cell-min-width:**10rem**;col-header-width:**10rem**;

The cell width is interesting when the calendar is displayed in a small area especially with the monthly view.
{% endhint %}

## Assignee Configuration

Let's configure the assignee settings. Note that the assignee could be any object (Standard or custom). It will be **Contact** in our case.

{% embed url="<https://youtu.be/51OeBzmh7ao>" %}
Multi Calendar - Assignee Configuration
{% endembed %}

{% hint style="info" %}
By default the list of assignee will be fetched using the list view configured on **Assignee ListView** property. If you want to switch between a specific set of teams, you can set a subset of listViews in the **Assignee Listview(s)** property like: **All\_Technicians,Plumbing**

The property should be populated using ',' separated list of API ListView names. If the property is empty, the user will see all available list views.
{% endhint %}

{% hint style="info" %}
The popover fields is ',' separated list of field API name. Those fields are used to display the popover when the user hover an assignee. If the property is empty, the compact layout will be used instead.
{% endhint %}

## Activity Configuration

Let's configure the activity settings. Note that the activity object could be any object (Standard or custom). It will be **Inspection\_\_c** in our case.

{% embed url="<https://youtu.be/7cYuUf3wovY>" %}
General Configuration - Activity Configuration
{% endembed %}

{% hint style="warning" %}
The **Activity From** and **To Date** fields must be DateTime.
{% endhint %}

{% hint style="info" %}
JSON string can be used to initialize brand new records. We support defaulting the activity dates and the assignee based on the selected cell. Below is an example to default our event.
{% endhint %}

```coffeescript
{
   "WhoId": "$userId",
   "StartDateTime": "$fromTime",
   "ActivityDate": "$fromDate"
}
```

{% hint style="info" %}
Multi Calendar supports cell coloring by providing the coloring configuration same as smart grids. Below is an example of coloring.
{% endhint %}

```coffeescript
[
    {
        "color": "#f4fe7abf",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Planned"
            }
        }
    },
    {
        "color": "#CFEBFE",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "In Progress"
            }
        }
    },
    {
        "color": "#8cedbb",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Completed"
            }
        }
    }
]
```

A rule can also take its colour from the record: set `color` to `$record.<FieldApiName>`. The field is fetched automatically and its value must be a valid CSS colour. Rules are evaluated top-down, first match wins.

```json
[
    {
        "color": "#8cedbb",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Completed"
            }
        }
    },
    {
        "color": "$record.Color__c",
        "exp": true
    }
]
```

{% hint style="success" %}
Activities are filtered based on the list of displayed assignee. The calendar supports also extra filtering by providing a list view or a JSON filter.
{% endhint %}

{% hint style="info" %}
[Mass/Record action](/advanced-guides/actions-library) can be configured based on requirement. We support quick actions or call a flow actions.
{% endhint %}

Below is a quick demo of the final version of our Multi Calendar.

{% embed url="<https://youtu.be/HK7JYM1Bs_g>" %}
General Configuration - demo
{% endembed %}

## Toggle Full Screen

This feature allows users to expand the calendar view to fill the entire screen. This enhances visibility and focus on scheduled events by removing surrounding interface elements and minimizing distractions.

Enabling the Toggle Full Screen feature allows you to switch your Calendar to fullscreen mode for a more focused view.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F17l8bJqA0Co44jlABzCu%2FScreenshot%202025-07-04%20at%2011.19.50.png?alt=media&#x26;token=c721603f-2ca5-4484-9121-d26a92aa03d8" alt=""><figcaption></figcaption></figure>

Below is a quick demo on how to set up the toggle for fullscreen on our Multi-Calendar.

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

## Quarterly View

The newly introduced **Quarterly View** in GridMate's Multi-Calendar provides a three-month timeline to enhance visibility across calendars.

Here is a quick demo on using the **Quarterly View** in our Multi-Calendar.

{% embed url="<https://youtu.be/ztGAVxC4-A0>" %}

## 2 Weeks View

The **2 Weeks View** displays a rolling 14-day period starting on the configured **Week Start Day**. **Previous** and **Next** move the calendar a full two-week period, which makes it a natural fit for bi-weekly planning such as pay periods.

Enable it by checking **Enable 2 Weeks View** in the Lightning App Builder: **2 Weeks** is then added to the view switcher between **Weekly** and **Monthly**. Set **Default View** to `biweekly` to open the calendar on this view.

## Aggregation

Aggregation simplifies complex datasets by applying functions like sum, average, count, and group-by to consolidate raw data into meaningful summaries.

Below is an example of how **aggregation** is used.

```coffeescript
{
    "Time_Spent__c": "sum"
}
```

Below is a quick demo on how to set up the **Aggregation** in our **Multi Calendar**.

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


# Single Calendar

GridMate’s **Single Calendar** component helps users to manage and view schedules effortlessly in one place. It allows drag-and-drop, conditional coloring, and filtering based on criteria, making calendar management more efficient and visually appealing.

In this guide, we'll discuss setting up a calendar to visualize project tasks efficiently. Below is a brief demonstration on configuring the Single Calendar component for effective project management.

{% embed url="<https://youtu.be/QwEe0C6gKIY>" %}
GM -Single Calendar
{% endembed %}

{% hint style="info" %}
Single Calendar supports cell coloring by providing the coloring configuration same as smart grids. Below is an example of coloring.
{% endhint %}

```coffeescript
[
    {
        "color": "#FADADD",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Backlog"
            }
        }
    },
    {
        "color": "#D8BFD8",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "In Progress"
            }
        }
    },
    {
        "color": "#B0E0E6",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "in Review"
            }
        }
    },
    {
        "color": "#E0FFFF",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "To Deploy"
            }
        }
    },
    {
        "color": "#FFFACD",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Done"
            }
        }
    }
]
```

A rule can also take its colour from the record: set `color` to `$record.<FieldApiName>`. The field is fetched automatically and its value must be a valid CSS colour. Rules are evaluated top-down, first match wins.

```json
[
    {
        "color": "#FFFACD",
        "exp": {
            "Status__c": {
                "operator": "=",
                "value": "Done"
            }
        }
    },
    {
        "color": "$record.Color__c",
        "exp": true
    }
]
```

{% hint style="info" %}
[Mass/Record action](https://docs.gridmate.io/advanced-guides/actions-library) can be configured based on requirement. We support quick action and calling a flow.
{% endhint %}

{% hint style="info" %}
You can add **Extra Activities** to the component using a JSON string format. This allows the component to render and display multiple activities.
{% endhint %}

<pre class="language-json"><code class="lang-json"><strong>[
</strong>    {
        "objectName": "Task",
        "filter": "{}",
        "titleFieldName": "Subject",
        "dateFieldName": "ActivityDate",
        "popoverFields": "CreatedDate,LastModifiedDate",
        "popoverColums": 2,
        "coloring": "[{\"color\":\"#8cedbb\",\"exp\":true}]",
        "actions": "[]",
        "defaultValues": "{\"StartDateTime\":\"$fromTime\"}",
        "icon": "standard:task",
        "label": "Tasks"
    }
]
</code></pre>

## Toggle Full Screen

Enabling this feature maximizes the calendar to full screen, providing a clearer and more focused view of scheduled events. By hiding surrounding UI elements, it reduces distractions and improves event navigation and planning.

Enabling the Toggle Full Screen feature allows you to switch your Calendar to fullscreen mode for a more focused view.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FFFeR6fGcGiwnUdjs2OIq%2FScreenshot%202025-07-04%20at%2011.22.01.png?alt=media&#x26;token=7c90a097-c64c-4650-9c41-9b35126f9e46" alt=""><figcaption></figcaption></figure>

Below is a quick demo on how to set up the toggle full-screen feature in our Single Calendar.

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

## Business Hours

Limit the daily and weekly views to working hours with two component properties:

| Property       | Default | Description              |
| -------------- | ------- | ------------------------ |
| Day Start Hour | 0       | First hour shown (0–23). |
| Day End Hour   | 24      | Last hour shown (1–24).  |

Set **Day Start Hour** to `8` and **Day End Hour** to `18` to show 8:00 AM–6:00 PM. Leave the defaults for a full day; an out-of-range value falls back to the full day. The monthly view is not affected.


# End User Calendar

As a Salesforce user, GridMate provides a configurable calendar that allows you to manage both standard and custom objects within a single calendar view. It supports advanced filtering, color conditioning, and more.

### Enable User Calendar Feature <a href="#enable-user-grid-feature" id="enable-user-grid-feature"></a>

To enable **User Calendar** feature, simply navigate to your account settings and follow these steps:

* Go to advanced user details,
* Click on permission set assignments,
* Select **GridMate Calendar User** permission set

You are ready to start using the GridMate **User Calendar** and enjoy all its benefits.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FRlEtEWslU8rZMjVipzzr%2Fimage.jpeg?alt=media&amp;token=3fe2a02f-54b1-445a-a1bb-7fd9b6b41a8a" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FkaWfWvXAdKsc6tqfwc98%2FScreenshot%202026-02-16%20at%2010.06.19.png?alt=media&amp;token=9abc6dc3-f513-46b4-8033-ebf16a4dda8b" alt=""><figcaption></figcaption></figure>

### User Calendar Demo <a href="#enable-user-grid-feature" id="enable-user-grid-feature"></a>

Once you have enabled the **User Calendar** feature, you can start creating your **Calendar** Component. The following video provides a step-by-step tutorial�&#xDC47;**.**

{% embed url="<https://youtu.be/4-Uc5B853l8>" %}

### Multi Object <a href="#enable-user-grid-feature" id="enable-user-grid-feature"></a>

GridMate’s **User Calendar Multi Object** feature allows users to display and manage multiple **standard** or **custom** objects within a **single calendar** view. Below is a step-by-step tutorial on how to configure and use the User Calendar Multi Object feature 👇.

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


# Compact Calendar

GridMate provides a lightning component **GM - Compact calendar** to display the **Event**, **Task**, or any **Objects** on the calendar as activities.

In this tutorial, we will configure the **GM - Compact calendar** component to display **Task** and **Events** object on the Calendar.

* Select an **Opportunity** and edit the page in the Lightning App Builder.
* From components list, drag and drop the component **GM - Compact calendar**.
* The **GM - Calendar component** is now ready for configuration in the Lightning App Builder.
* The property values can be configured to tailor the component to the needs of the end-user.
* To perform a quick configuration, populate the properties below:
  * Title : **Opportunity Calendar.**
  * Custom Icon : **standard:task.**
  * Json config : See [Json config](#below-is-the-json-config-configured-for-the-demo).

#### Below is the JSON Config configured for the demo

{% code fullWidth="false" %}

```coffeescript
[
    {
        "objectApiName": "Task",
        "dateField": "ActivityDate",       
        "iconName": "standard:task",
        "backgroundColor": "",
        "filter": "{\"WhatId\": {\"operator\" : \"=\", \"value\" : \"$recordId\"}}",
        "titleField": "Subject",
        "detailFields": [
            "Description"
        ]
    },
    {
        "objectApiName": "Event",
        "dateField": "ActivityDate",
        "fromDateField": "StartDateTime",
        "toDateField": "EndDateTime",
        "iconName": "standard:event",
        "backgroundColor": "#94baf7",
        "filter": "{\"WhatId\": {\"operator\" : \"=\", \"value\" : \"$recordId\"}}",
        "titleField": "Subject",
        "detailFields": [
            "Description"
        ]
    }
]
```

{% endcode %}

#### Coloring from a record field

`backgroundColor` accepts either a fixed colour or a JSON string of coloring rules (same `color` / `exp` format as the Single Calendar). A rule's `color` may be `$record.<FieldApiName>` to paint each activity with the colour stored on the record.

```json
{
    "objectApiName": "Event",
    "dateField": "ActivityDate",
    "fromDateField": "StartDateTime",
    "toDateField": "EndDateTime",
    "iconName": "standard:event",
    "backgroundColor": "[{\"color\":\"$record.Color__c\",\"exp\":true}]",
    "filter": "{\"WhatId\": {\"operator\" : \"=\", \"value\" : \"$recordId\"}}",
    "titleField": "Subject",
    "detailFields": ["Description"]
}
```

Below is a step by step tutorial to configure the **GM - Compact Calendar** 👇.

{% embed url="<https://youtu.be/ze0-eqS5GBI>" %}
GridMate - Compact Calendar
{% endembed %}


# Object Timeline

GridMate provides a component to display records in a timeline. **GM - Object Timeline** is highly configurable to display any kind of object as a timeline.

Salesforce standard Activity Timeline supports Activities ( Emails, Tasks, Events, Lists emails, Logged calls ) in accounts, cases, claims, contacts, contracts, insurance policies, leads, opportunities, and activity-enabled custom objects. **GM - Object Timeline** will cater for activities as standard timeline and any standard/custom object.

In this tutorial, we will setup a custom timeline and configure fields to display tasks/events and the opportunity object on the same timeline. Below is a quick demo on how to configure the **GM - Object Timeline** component in the opportunity record page.

{% embed url="<https://youtu.be/LP3qybeFqDU>" %}
Object Timeline Demo
{% endembed %}

Below is the JSON Config configured for the demo.

```coffeescript
[
    {
        "objectApiName": "Opportunity",
        "refFieldApiName": "Id",
        "titleField": "Name",
        "dateField": "CloseDate",
        "summaryField": "Name",
        "detailFields": [
            "StageName",
            "NextStep"
        ],
        "themeInfo": {
            "iconName": "standard:opportunity",
            "color": "black"
        },
        "recordActions": [
            {
                "name": "View",
                "label": "View",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "view"
                    }
                }
            },
            {
                "name": "Edit",
                "label": "Edit",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "edit"
                    }
                }
            },
            {
                "name": "Opportunity.gmpkg__Update_Stage",
                "label": "Update Stage"
            }
        ]
    },
    {
        "objectApiName": "Task",
        "refFieldApiName": "WhatId",
        "titleField": "Subject",
        "dateField": "ActivityDate",
        "summaryField": "WhatId",
        "detailFields": [
            "Subject",
            "Description",
            "Status"
        ],
        "overdueExp": {
            "Status": {
                "operator": "!=",
                "value": "Completed"
            }
        },
        "filter": "{\"and\":[{\"Type\":{\"operator\":\"in\",\"value\":\"('Meeting','Email')\"}}]}",
        "themeInfo": {
            "iconName": "standard:task",
            "emailBodyHeight": "20rem",
            "color": "black"
        },
        "recordActions": [
            {
                "name": "View",
                "label": "View",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "view"
                    }
                }
            },
            {
                "name": "Edit",
                "label": "Edit",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "edit"
                    }
                }
            }
        ]
    },
    {
        "objectApiName": "Event",
        "refFieldApiName": "WhatId",
        "titleField": "Subject",
        "dateField": "ActivityDate",
        "summaryField": "WhatId",
        "detailFields": [
            "StartDateTime",
            "EndDateTime",
            "Subject",
            "Description",
            "Status"
        ],
        "themeInfo": {
            "iconName": "standard:event"
        },
        "recordActions": [
            {
                "name": "View",
                "label": "View",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "view"
                    }
                }
            },
            {
                "name": "Edit",
                "label": "Edit",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "edit"
                    }
                }
            }
        ]
    }
]
```

The most important property is the Timeline Configuration which a user needs to insert as a JSON string similar to the below block of code.

```coffeescript
[
    {
        "objectApiName": "Task",
        "refFieldApiName": "WhatId",
        "titleField": "Subject",
        "dateField": "ActivityDate",
        "detailFields": [
            "Subject",
            "Description",
            "Status"
        ],
        "overdueExp": {
            "Status": {
                "operator": "!=",
                "value": "Completed"
            }
        },
        "recordActions": [
            {
                "name": "View",
                "label": "View",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "view"
                    }
                }
            },
            {
                "name": "Edit",
                "label": "Edit",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "edit"
                    }
                }
            }
        ],
        "themeInfo": {
            "iconName": "standard:event",
            "color": "black"
        }
    }
]
```

The component can be configured as follows:

* **objectApiName**: Object API name you need to configure.
* **refFieldApiName:** Reference field API name to retrieve related records based on the current record. In this case, using `WhatId` will retrieve all tasks related to the opportunity.
* **titleField:** Field API name to display the title.
* **dateField:** Field API name to display the date.
* **detailFields:** Array of fields to display as a detail view.
* **filter:** JSON string to define filter criteria. Don’t forget \_\_c for custom fields.

  See [GM - RelatedList Grid ](https://docs.gridmate.io/package-reference/components-library/gm-relatedlist-grid#specification)filter property for more details.
* **overdueExp:** Logical expression to check if the activity is overdue. The expression is evaluated only if the activity date is in the past. If the activity is overdue, it will be displayed at the top of the timeline.
* **recordActions:** Configure record actions to support editing, viewing, initiating a custom action, or running a flow.
  * **visibility:** Optional rule on a record action. The action is displayed only on entries matching the rule; same syntax as `filter`. See [Action Visibility](#action-visibility).

{% hint style="info" %}
If the Task is an Email , the summary field will display the TextBody in the EmailMessage and the detail section displays the HtmlBody.
{% endhint %}

## Action Visibility

Add a `visibility` rule to a record action to show it only on the timeline entries that match. Actions without a rule are always displayed, and the fields used by a rule are queried automatically. Rules can be combined with `and` / `or`.

In the configuration below, **View** is always available while **Edit** is hidden on completed tasks.

```coffeescript
[
    {
        "objectApiName": "Task",
        "refFieldApiName": "WhatId",
        "titleField": "Subject",
        "dateField": "ActivityDate",
        "detailFields": [
            "Subject",
            "Description"
        ],
        "recordActions": [
            {
                "name": "View",
                "label": "View",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "view"
                    }
                }
            },
            {
                "name": "Edit",
                "label": "Edit",
                "navigate": {
                    "type": "standard__recordPage",
                    "attributes": {
                        "actionName": "edit"
                    }
                },
                "visibility": {
                    "Status": {
                        "operator": "!=",
                        "value": "Completed"
                    }
                }
            }
        ],
        "themeInfo": {
            "iconName": "standard:task",
            "color": "black"
        }
    }
]
```


# File Explorer

GridMate provides a lightning component **GM - File Explorer** to display the list of files related to a specific record.

In this tutorial, we will configure **GM - File Explorer** .

1. Select an account record and edit the page in the Lightning App Builder.
2. From the components list, search for GM - File Explorer.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the component to the needs of the end-user.
5. To perform a quick configuration, populate the properties below :
   * Default View : **table**
   * Enable Delete : **Checked**
   * Enable Copy/Paste : **Checked**
   * Show Border : **Checked**

Below is a step by step tutorial to configure the **GM - File Explorer**.

{% embed url="<https://youtu.be/j2SdIxEMozQ>" %}
**GM - File Explorer**
{% endembed %}

### Search By Topic

This feature enhances the search process by delivering precise and targeted results that align with users' specific interests and information needs.

{% embed url="<https://youtu.be/p6j08F_iFnw>" %}
Search By Topic
{% endembed %}

## Disable Upload

This configuration option blocks direct file uploads to Salesforce Files, supporting centralized storage management and policy enforcement.

To **Disable Upload** properties.

1. Edit the Lightning page in the App Builder.
2. Scroll down until you locate the **Disable Salesforce Upload** setting, then check it.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FPvkYygwKGubhzueVTovm%2FScreenshot%202026-02-24%20at%2012.03.38.png?alt=media&amp;token=18e13888-773a-409b-8d7d-6bea4b5cf9ab" alt=""><figcaption></figcaption></figure>

Below is a step by step tutorial to **Disable Upload** feature 👇.

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

## Disable Download

This feature strengthens data protection by restricting file downloads, ensuring that files remain within approved storage environments.

To **Disable Download** properties.

1. Edit the Lightning page in the **App Builder**.
2. Scroll down until you locate the **Disable Download** section, then check it.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FKEHbOQLKvfEmZKUog30D%2FScreenshot%202026-02-24%20at%2012.03.38%202.png?alt=media&amp;token=10192550-8998-4bfe-a104-ce9ba5738ebc" alt=""><figcaption></figcaption></figure>

Below is a step by step tutorial to **Disable Download** feature 👇.

{% embed url="<https://youtu.be/n_XIwrt6rFc?si=Lwohn0Er_o1UDi36&t=50>" %}

## Enhanced Preview

This feature improves the file preview experience by delivering higher rendering quality and intuitive navigation controls, including zoom in, zoom out, and rotation for better document inspection.

To Enable **Enhanced Preview**.

1. Edit the Lightning page in the App Builder.
2. Scroll down until you locate the Enable **Enhanced Preview** setting, then check it.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FVKrDoOwzSjKrxez4CFVJ%2FScreenshot%202026-02-24%20at%2022.09.24%202.png?alt=media&amp;token=2b0d9df1-e1c3-474c-b520-7bae34dbdd58" alt=""><figcaption></figcaption></figure>

Below is a step-by-step tutorial on how to use the **Enhanced Preview** feature 👇

{% embed url="<https://www.youtube.com/watch?v=a2ycU7VMAs4>" %}

## Inline Preview

This feature allows users to preview file contents directly within the **File Explorer** interface, eliminating the need to open a separate modal and enabling a more efficient in-context viewing experience.

{% hint style="info" %}
When selecting **Top** or **Bottom** alignment, configure the **Inline Preview Height(px)** to adjust the vertical space of the preview panel.

When selecting **Left** or **Right** alignment, the layout switches to horizontal mode, allowing you to define the **Inline Preview Width(px)** instead.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FvqhnZNMOyktC2kdJt9QA%2FScreenshot%202026-02-24%20at%2022.09.24.png?alt=media&amp;token=3cba4515-2dca-47ab-9515-a7a527039d9e" alt=""><figcaption></figcaption></figure>

Below is a step-by-step tutorial on how to use the **Inline Preview** feature 👇

{% embed url="<https://youtu.be/a2ycU7VMAs4?si=7Cxtcvqoekg_7GpA&t=78>" %}


# Record Layout

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.

1. Select an opportunity record and edit the page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM - Record Layout**.
3. The component is now ready for configuration in the Lightning App Builder.
4. To perform a quick configuration, populate required property values:
   * 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" %}

```coffeescript
{
    "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" %}

```coffeescript
[
    {
        "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 %}


# Record Layout (LWC)

The **GM - Record Layout (LWC)** component is designed to display related **standard or custom Salesforce objects** using a configurable layout. It overcomes the limitations of the Salesforce UI API, offering a more flexible and powerful way to interact with data.

This component enables the manipulation of **any Salesforce object** standard or custom with dedicated support for **Event** and **Task** records.

**Global Key Features**

* **Multi-Column Layout**: Supports layouts with more than two columns for greater flexibility and improved visual organization.
* **Dynamic Forms**: Dynamically display fields based on the values of other fields, enabling intelligent and responsive form behavior.
* **Advanced Error Handling**: Implements Salesforce-like record and field-level error handling to ensure a consistent user experience.
* **Conditional Coloring**: Supports custom coloring rules to enhance readability and highlight key data.

**Edit Features**

* **Edit and Form Modes**: Easily switch between read-only and editable modes to accommodate different interaction needs.
* **Delegated Save**: Provides delegated save functionality for streamlined data handling and custom logic control.
* **Default Values**: Allows setting default field values for faster and more accurate record creation.

{% hint style="info" %}
Fully supports pre-save and post-save hooks for custom logic execution during the save process
{% endhint %}

## Enhanced Record Layout

### **Multi-Column Layout**&#x20;

**GridMate** bypasses Salesforce’s standard 2 columns layout limitation, allowing for more flexible and customizable record layouts.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FUSPwlKLjDxDWaM2X7Bk5%2FCapture%20d%E2%80%99e%CC%81cran%202025-10-30%20a%CC%80%2012.46.29.png?alt=media&amp;token=f086a6ec-06f8-450e-8ecb-f7914c9adf97" alt=""><figcaption></figcaption></figure>

Below the the **Multi-Column** Layout  Json configuration.

{% code expandable="true" %}

```json
{
    "density": "comfy",
    "sections": [
        {
            "name": "accountInformation",
            "label": "Account Information",
            "active": true,
            "cols": 3,
            "rows": [
                [
                    {
                        "apiName": "Name"
                    },
                    {
                        "apiName": "AccountSource"
                    },
                    {
                        "apiName": "Industry"
                    }
                ],
                [
                    {
                        "apiName": "Phone"
                    },
                    {
                        "apiName": "Fax"
                    },
                    {
                        "apiName": "Website"
                    }
                ]
            ]
        },
        {
            "name": "addressInformation",
            "label": "Address Information",
            "active": true,
            "cols": 2,
            "rows": [
                [
                    {
                        "apiName": "BillingStreet"
                    },
                    {
                        "apiName": "ShippingStreet"
                    }
                ],
                [
                    {
                        "apiName": "BillingCity"
                    },
                    {
                        "apiName": "ShippingCity"
                    }
                ],
                [
                    {
                        "apiName": "BillingPostalCode"
                    },
                    {
                        "apiName": "ShippingPostalCode"
                    }
                ]
            ]
        }
    ]
}
```

{% endcode %}

### Dynamic Forms

Dynamically display fields or sections based on the values of other fields.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FeS1WIbIgATIebAgUJBZn%2FDynamic%20Forms-2.gif?alt=media&amp;token=b2d5239e-39c9-47ab-ac2a-16dcdce0d987" alt=""><figcaption></figcaption></figure>

Below is the **JSON configuration** used for this example:

{% tabs %}
{% tab title="Field Visibility" %}

```json
{
    "apiName": "Website",
    "visibility": {
        "Industry": {
            "operator": "=",
            "value": "Media"
        }
    }
}
```

{% endtab %}

{% tab title="Section Visibility" %}

```json
{
    "name": "addressInformation",
    "label": "Address Information",
    "active": true,
    "cols": 2,
    "visibility": {
        "Industry": {
            "operator": "!=",
            "value": "Media"
        }
    },
    "rows": [...]
}
```

{% endtab %}
{% endtabs %}

### **Advanced Error Handling**

We can handle both **field-level** and **record-level** errors. In this example, we’ve created two validation rules:

* The first rule triggers an error message at the **field level**.
* The second rule displays the error at the **record layout level**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FDlLwvLSh08lmerOtNFsc%2FCapture%20d%E2%80%99e%CC%81cran%202025-10-30%20a%CC%80%2013.14.10.png?alt=media&amp;token=c173e527-e7a3-474c-a68e-d5e1bf59a5fb" alt=""><figcaption></figcaption></figure>

Below is an example of  how it will be displayed on the UI:

* The **first validation rule** shows an error message directly on the **field** where the issue occurs.
* The **second validation rule** displays the error at the **record layout level**, indicating a broader record-related issue.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FtTmOgicewfVCi4e2lonv%2FDynamic%20Forms-1.gif?alt=media&amp;token=1434b279-ba24-4119-b977-478157501fb5" alt=""><figcaption></figcaption></figure>

### **Conditional Coloring**

Below is an example of Conditional Coloring:\
When the **Account Source** is set to **Partner**, the **Account Site** field is automatically highlighted in **green** to visually indicate the condition, and this behavior works in both **Edit** and **Read** modes.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FHXBnC4B43dbUXGoIr70J%2FDynamic%20Forms-3.gif?alt=media&amp;token=a45c33f7-5635-4086-b20a-d5c3c5836b4a" alt=""><figcaption></figcaption></figure>

Below is the **JSON configuration** used for this example:

```coffeescript
{
    "apiName": "Site",
    "coloring": [
        {
            "color": "#a6f79e",
            "exp": {
                "AccountSource": {
                    "operator": "=",
                    "value": "Partner"
                }
            }
        }
    ]
}
```

## Edit/Form Mode

To **enable Edit Form Mode**, the component must be wrapped inside an **Aura wrapper**.\
Below is the configuration used for this setup.

{% hint style="info" %}
When using **Edit Mode**, make sure to set the **defaultValues** property.\
Leave it empty only if you don’t have any default information to display \
Otherwise, the component will not appear.
{% endhint %}

#### **Component Managed Save**

Allow the component to handle the **save process** and **error handling** automatically.\
You can also redirect or customize any post-save actions inside the `handleSave` method

{% tabs fullWidth="true" %}
{% tab title="auraRecordLayout.cmp" %}
{% code fullWidth="true" expandable="true" %}

```xml
<aura:component implements="force:hasSObjectName,
                            force:appHostable,
                            flexipage:availableForAllPageTypes,
                            flexipage:availableForRecordHome,
                            force:hasRecordId"
                access="global">
                
    <aura:attribute name="sObjectName" type="String" />
    <aura:attribute name="recordLayoutJSON" type="String" />
    <aura:attribute name="defaultValues" type="Object" />
    <aura:attribute name="isReady" type="Boolean" default="false" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.isReady}">
        <gmpkg:RecordLayoutLWCComponent aura:id="recordLayout"
                                        sObjectName="{!v.sObjectName}"
                                        editMode="true"
                                       
                                        recordId="{!v.recordId}"
                                        recordIdField="recordId"
                                        targetObjName="Account"
                                        
                                        recordLayout="{!v.recordLayoutJSON}"
                                        
                                        defaultValues="{!v.defaultValues}" 
                                        
                                        onsuccess="{!c.handleSuccess}"
                                        />
    </aura:if>
</aura:component>
```

{% endcode %}
{% endtab %}

{% tab title="auraRecordLayout.js" %}
{% code expandable="true" %}

```javascript
({
    doInit : function(component, event, helper) { 
        const recordLayoutJSON = {
            "density": "comfy",
            "sections": [
                {
                    "name": "accountInformation",
                    "label": "Account Information",
                    "active": true,
                    "cols": 3,
                    "rows": [
                        [
                            {
                                "apiName": "Name"
                            },
                            {
                                "apiName": "AccountSource"
                            },
                            {
                                "apiName": "Website"
                            }
                        ]
                    ]
                },
                {
                    "name": "addressInformation",
                    "label": "Address Information",
                    "active": true,
                    "cols": 2,
                    "rows": [
                        [
                            {
                                "apiName": "BillingStreet"
                            },
                            {
                                "apiName": "ShippingStreet"
                            }
                        ]
                    ]
                }
            ]
        };
        component.set('v.defaultValues', JSON.stringify({}));
        component.set('v.recordLayoutJSON', JSON.stringify(recordLayoutJSON));
        component.set('v.isReady', true);
    },
    handleSuccess : function(component, event, helper) { 
        let item = event.getParam('value');
        console.log('item', item);
    }  
})
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### **Delegated Save**

If you prefer complete control over the save logic, enable `delegatedSave`.\
In this mode, the new record or changes are exposed in the `handleSubmit` method, and the **database save operation** must be explicitly handled by the developer.

{% tabs fullWidth="true" %}
{% tab title="auraRecordLayout.cmp (Delegated Save)" %}
{% code expandable="true" %}

```xml
<aura:component implements="force:hasSObjectName,
                            force:appHostable,
                            flexipage:availableForAllPageTypes,
                            flexipage:availableForRecordHome,
                            force:hasRecordId"
                access="global">
                
    <aura:attribute name="sObjectName" type="String" />
    <aura:attribute name="recordLayoutJSON" type="String" />
    <aura:attribute name="defaultValues" type="Object" />
    <aura:attribute name="isReady" type="Boolean" default="false" />
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>
    
    <aura:if isTrue="{!v.isReady}">
        <gmpkg:RecordLayoutLWCComponent aura:id="recordLayout"
                                        sObjectName="{!v.sObjectName}"
                                        editMode="true"
                                        
                                        recordId="{!v.recordId}"
                                        recordIdField="recordId"
                                        targetObjName="Account" 
                                        
                                        recordLayout="{!v.recordLayoutJSON}"
                                        
                                        defaultValues="{!v.defaultValues}"
                                        
                                        delegatedSave="true"
                                        onsubmit="{!c.handleSubmit}"
                                        />
    </aura:if>
</aura:component>
```

{% endcode %}
{% endtab %}

{% tab title="auraRecordLayout.js (Delegated Save) " %}
{% code expandable="true" %}

```javascript
({
    doInit : function(component, event, helper) { 
        const recordLayoutJSON = {
            "density": "comfy",
            "sections": [
                {
                    "name": "accountInformation",
                    "label": "Account Information",
                    "active": true,
                    "cols": 3,
                    "rows": [
                        [
                            {
                                "apiName": "Name"
                            },
                            {
                                "apiName": "AccountSource"
                            },
                            {
                                "apiName": "Website"
                            }
                        ]
                    ]
                },
                {
                    "name": "addressInformation",
                    "label": "Address Information",
                    "active": true,
                    "cols": 2,
                    "rows": [
                        [
                            {
                                "apiName": "BillingStreet"
                            },
                            {
                                "apiName": "ShippingStreet"
                            }
                        ]
                    ]
                }
            ]
        };
        
        component.set('v.defaultValues', JSON.stringify({}));
        component.set('v.recordLayoutJSON', JSON.stringify(recordLayoutJSON));
        component.set('v.isReady', true);
    },
    handleSubmit : function(component, event, helper) { 
        let item = event.getParam('value');
        console.log('item', item);
        
        // how to set record/global errors
        let recordErrors = [
            {
                message: "Invalid Name"
            }
        ];
        
        // how to set fields errors
        let fieldErrors = [
            {
                fieldApiName : "Name",
                errors : [
                    {
                        message: "Invalid Name"
                    } 
                ]
            }
        ];
        
        let recordLayout = component.find('recordLayout');
        recordLayout.setErrors(recordErrors, fieldErrors);
    }
})
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
When both `recordId` and `recordIdField` are provided, the component can load and edit an existing record:\
&#x20;       \- `recordId` : identifies which record to load.\
&#x20;       \- `recordIdField` : specifies where the record ID is stored in the layout.

If NOT, there’s no record context. \
So the layout opens as a blank form with default or empty fields, ready for new record creation.
{% endhint %}

#### **No action bar**

It allows you to add a footer section with **Save** and **other custom buttons** that aren’t part of the default layout action bar.

The Save button calls `recordLayout.saveRecord()` to save the current record.

{% tabs fullWidth="true" %}
{% tab title="noActionBar.cmp" %}
{% code fullWidth="true" expandable="true" %}

```xml
<aura:component implements="force:hasSObjectName,
                            force:appHostable,
                            flexipage:availableForAllPageTypes,
                            flexipage:availableForRecordHome,
                            force:hasRecordId"
                access="global">

    <!-- Attributes -->
    <aura:attribute name="sObjectName" type="String" />
    <aura:attribute name="recordLayoutJSON" type="String" />
    <aura:attribute name="defaultValues" type="Object" />
    <aura:attribute name="isReady" type="Boolean" default="false" />

    <!-- Init Handler -->
    <aura:handler name="init" value="{!this}" action="{!c.doInit}"/>

    <!-- Main Body -->
    <aura:if isTrue="{!v.isReady}">
        <div class="slds-card slds-p-around_medium">

            <!-- Record Layout -->
            <gmpkg:RecordLayoutLWCComponent aura:id="recordLayout"
                                            sObjectName="{!v.sObjectName}"
                                            editMode="true"
                                            noActionBar="true"
                                            targetObjName="Account"
                                            recordLayout="{!v.recordLayoutJSON}"
                                            defaultValues="{!v.defaultValues}"
                                            onsuccess="{!c.handleSuccess}"
                                            />

            <!-- Footer with Buttons -->
            <div class="slds-text-align_center slds-m-top_medium">
                <lightning:button label="Cancel"
                                  variant="neutral"
                                  onclick="{!c.handleCancel}" />

                <lightning:button label="Save"
                                  variant="brand"
                                  class="slds-m-left_small"
                                  onclick="{!c.handleSave}" />
            </div>

        </div>
    </aura:if>
</aura:component>
```

{% endcode %}
{% endtab %}

{% tab title="noActionBar.js" %}
{% code expandable="true" %}

```javascript
({
    doInit: function(component, event, helper) { 
        const recordLayoutJSON = {
            "density": "comfy",
            "sections": [
                {
                    "name": "accountInformation",
                    "label": "Account Information",
                    "active": true,
                    "cols": 3,
                    "rows": [
                        [
                            { "apiName": "Name" },
                            { "apiName": "AccountSource" },
                            { "apiName": "Website" }
                        ]
                    ]
                },
                {
                    "name": "addressInformation",
                    "label": "Address Information",
                    "active": true,
                    "cols": 2,
                    "rows": [
                        [
                            { "apiName": "BillingStreet" },
                            { "apiName": "ShippingStreet" }
                        ]
                    ]
                }
            ]
        };

        component.set("v.defaultValues", JSON.stringify({}));
        component.set("v.recordLayoutJSON", JSON.stringify(recordLayoutJSON));
        component.set("v.isReady", true);
    },

    handleSave: function(component, event, helper) {
        console.log('handleSave');

        const recordLayout = component.find("recordLayout");
        recordLayout.saveRecord();
    },

    handleCancel: function(component, event, helper) {
        // Cancel action
        console.log('handleCancel')
    }
});
```

{% endcode %}
{% endtab %}

{% tab title="noActionBar.css" %}

```css
// if you want to remove box-shadow and padding 
.THIS .risen {
    box-shadow: none;
    padding: 0;
}
```

{% endtab %}
{% endtabs %}

## Record Layout Description

#### 1. Overall Structure

The JSON defines a record layout configuration for a UI component.

At the top level:

* density → controls field spacing ("comfy", "compact").
* sections → an array of section objects, each defining its own layout and behavior.

#### 2. Section object properties

Each section in "sections": \[ … ] has these key properties:

<table data-full-width="true"><thead><tr><th width="114.01171875">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>name</strong></td><td><p>Internal unique identifier for the section (used in logic).</p><pre class="language-json"><code class="lang-json">{
  "name": "accountInformation"
}
</code></pre></td></tr><tr><td><strong>label</strong></td><td><p>The display title of the section, shown to users.</p><pre class="language-json"><code class="lang-json">{
  "label": "Account Information"
}
</code></pre></td></tr><tr><td><strong>active</strong></td><td><p>A flag (true/false or special value like "always") that controls if the section is enabled. If set to "always" it means the section is always active.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "name": "contactInformation",
  "label": "Contact Information",
  "active": "always",
  "cols": 2,
  "rows": [
    [
      { "apiName": "Email" },
      { "apiName": "Phone" }
    ]
  ]
}
</code></pre></td></tr><tr><td><strong>cols</strong></td><td><p>Number of columns to display in that section. This controls layout/grid: how many fields (or blocks) appear per row.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "name": "accountInformation",
  "label": "Account Information",
  "cols": 3,
  "rows": [
    [
      { "apiName": "Name" },
      { "apiName": "Phone" },
      { "apiName": "Website" }
    ]
  ]
}
</code></pre></td></tr><tr><td><strong>visibility</strong></td><td><p>A visibility condition (JSON object) that determines whether the entire section is visible or hidden based on field values of the record. This follows the same rule‐structure as the “readOnly” conditions (operator, value). </p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "name": "addressInformation",
  "label": "Address Information",
  "active": true,
  "visibility": {
    "BillingCountry": { "operator": "=", "value": "USA" }
  },
  "cols": 2,
  "rows": [
    [
      { "apiName": "BillingStreet" },
      { "apiName": "ShippingStreet" }
    ]
  ]
}
</code></pre></td></tr><tr><td><strong>readOnly</strong></td><td><p>A read‐only condition for the whole section. If this evaluates true, all fields in the section become non‐editable.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "name": "accountInformation",
  "label": "Account Information",
  "active": true,
  "readOnly": {
    "Industry": { "operator": "=", "value": "Banking" }
  },
  "cols": 3,
  "rows": [
    [
      { "apiName": "Name" },
      { "apiName": "Industry" },
      { "apiName": "Phone" }
    ]
  ]
}
</code></pre></td></tr><tr><td><strong>rows</strong></td><td><p>An array of rows. Each row is itself an array of “cells” (either field definitions or emptyBlock definitions) that fill up to cols columns. Fields can span columns using colSize.</p><pre class="language-json" data-full-width="true" data-expandable="true"><code class="lang-json">{
  "name": "accountInformation",
  "label": "Account Information",
  "cols": 3,
  "rows": [
    [
      { "apiName": "Name" },
      { "apiName": "Phone" },
      { "apiName": "Website" }
    ],
    [
      { "apiName": "Description", "colSize": 2 },
      { "emptyBlock": true }
    ]
  ]
}
</code></pre></td></tr></tbody></table>

#### 3. Field (cell) object properties

Inside rows, each cell can be:

* A field object with properties, or
* An empty block object: { "emptyBlock": true } (used for layout alignment).

For field objects, common properties include:

<table data-full-width="true"><thead><tr><th width="134.5">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>apiName</strong></td><td><p>The API name of the field in the data model that will be displayed.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "Name"
}
</code></pre></td></tr><tr><td><strong>colSize</strong></td><td><p>Optional. Defines how many columns wide the field spans (useful when a field should cover more than a single column).</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "Description",
  "colSize": 2
}
</code></pre></td></tr><tr><td><strong>noWhitespace</strong></td><td><p>Optional boolean. If true, removes extra whitespace/margins around the field component.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "Industry",
  "noWhitespace": true
}
</code></pre></td></tr><tr><td><strong>readOnly</strong></td><td><p>A JSON condition (like visibility) that determines if the field is editable or not. Even if the section is editable, this field can individually be read‐only.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "AccountSource",
  "readOnly": {
    "AccountSource": { "operator": "in", "value": ["Web", "Other"] }
  }
}
</code></pre></td></tr><tr><td><strong>visibility</strong></td><td><p>A JSON condition that determines whether the field is shown at all.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "Industry",
  "visibility": {
    "BillingCountry": { "operator": "!=", "value": "USA" }
  }
}
</code></pre></td></tr><tr><td><strong>coloring</strong></td><td><p>An array of coloring rules: each rule has a color value and an exp object that defines a condition under which that color is applied to the field. This allows conditional highlighting.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "Status",
  "coloring": [
    {
      "color": "#a6f79e",
      "exp": { "Status": { "operator": "=", "value": "Active" } }
    }
  ]
}
</code></pre></td></tr><tr><td><strong>emptyBlock</strong></td><td><p>If the object is { "emptyBlock": true }, it means “insert an empty slot here” for layout purposes (no field displayed).</p><pre class="language-json" data-expandable="true"><code class="lang-json">[
  { "apiName": "Description", "colSize": 2 },
  { "emptyBlock": true }
]
</code></pre></td></tr><tr><td><strong>autocomplete</strong></td><td><p>Provides a City field with an autocomplete dropdown, suggesting values like <em>Paris</em>, <em>London</em>, <em>New York</em>, and <em>Rome</em> as the user types.</p><pre class="language-json" data-expandable="true"><code class="lang-json">{
  "apiName": "City",
  "autocomplete": ["Paris", "London", "New York", "Rome"]
}
</code></pre></td></tr></tbody></table>

## Examples

<details>

<summary>Advanced Layout (conditional visibility, read-Only, and autocomplete)</summary>

#### **Section 1 : Account Information**

* Active: always.
* Read-only when: Industry = Banking.
* 3-column grid layout.

**4 rows :**

1. Name, AccountSource, Industry&#x20;
   * AccountSource: read-only if “Web” or “Other”; turns green (#a6f79e) when “Web”.
   * Industry: visible only when BillingCountry != USA and with no extra whitespace.
2. Phone, Fax, and one conditional emptyBlock that appears only when BillingCountry = USA.
3. Website, Description (spanning 2 columns).
4. BillingCity field uses autocomplete with static options: “Paris”, “New York”, “London”, “Rome”.

***

#### **Section 2 : Address Information**

* Visible when: BillingCountry = USA.
* Read-only when: BillingCity = New York.
* 2-column layout.

**3 rows :**

1. BillingStreet, ShippingStreet.
2. BillingCity, ShippingCity.
3. BillingPostalCode, ShippingPostalCode.

***

#### **Section 3 : SSN Information**

* Visible when: Account.BillingCountry = USA.
* Read-only when: Account.Type != Customer.
* 1-column layout.
* Displays a single field SSN\_\_c.

{% code expandable="true" %}

```json
{
            "density": "comfy",
            "sections": [
                {
                    "name": "accountInformation",
                    "label": "Account Information",
                    "active": "always",
                    "cols": 3,
                    "readOnly": {
                        "Industry": { "operator": "=", "value": "Banking" }
                    },
                    "rows": [
                        [
                            { "apiName": "Name" },
                            {
                                "apiName": "AccountSource",
                                "readOnly": {
                                    "AccountSource": { "operator": "in", "value": ["Web", "Other"] }
                                },
                                "coloring": [
                                    {
                                        "color": "#a6f79e",
                                        "exp": { "AccountSource": { "operator": "=", "value": "Web" } }
                                    }
                                ]
                            },
                            {
                                "apiName": "Industry",
                                "noWhitespace": true,
                                "visibility": {
                                    "BillingCountry": { "operator": "!=", "value": "USA" }
                                }
                            }
                        ],
                        [
                            {
                                "emptyBlock": true,
                                "visibility": {
                                    "BillingCountry": { "operator": "=", "value": "USA" }
                                }
                            },
                            { "apiName": "Phone" },
                            { "apiName": "Fax" }
                        ],
                        [
                            { "apiName": "Website" },
                            { "apiName": "Description", "colSize": 2 }
                        ],
                        [
                            {
                                "apiName": "BillingCity",
                                "autocomplete": ["Paris", "New York", "London", "Rome"]
                            },
                            { "emptyBlock": true },
                            { "emptyBlock": true }
                        ]
                    ]
                },
                {
                    "name": "addressInformation",
                    "label": "Address Information",
                    "active": true,
                    "cols": 2,
                    "visibility": {
                        "BillingCountry": { "operator": "=", "value": "USA" }
                    },
                    "readOnly": {
                        "BillingCity": { "operator": "=", "value": "New York" }
                    },
                    "rows": [
                        [
                            { "apiName": "BillingStreet" },
                            { "apiName": "ShippingStreet" }
                        ],
                        [
                            { "apiName": "BillingCity" },
                            { "apiName": "ShippingCity" }
                        ],
                        [
                            { "apiName": "BillingPostalCode" },
                            { "apiName": "ShippingPostalCode" }
                        ]
                    ]
                }
            ]
        }
```

{% endcode %}

</details>

<details>

<summary>Minimal Contact Info (2 columns, autocomplete, emptyBlock)</summary>

```json
{
  "density": "comfy",
  "sections": [
    {
      "name": "contactInfo",
      "label": "Contact Information",
      "active": true,
      "cols": 2,
      "rows": [
        [
          { "apiName": "FirstName" },
          { "apiName": "LastName" }
        ],
        [
          { "apiName": "Email" },
          { "apiName": "Phone" }
        ],
        [
          { "apiName": "MailingCity", "autocomplete": ["Paris", "London", "New York", "Rome"] },
          { "emptyBlock": true }
        ]
      ]
    }
  ]
}
```

</details>

<details>

<summary>Opportunity Summary (3 columns, field visibility, coloring)</summary>

```json
{
  "density": "comfy",
  "sections": [
    {
      "name": "opptySummary",
      "label": "Opportunity Summary",
      "active": "always",
      "cols": 3,
      "rows": [
        [
          { "apiName": "Name" },
          {
            "apiName": "StageName",
            "coloring": [
              { "color": "#a6f79e", "exp": { "StageName": { "operator": "in", "value": ["Prospecting", "Qualification"] } } }
            ]
          },
          { "apiName": "CloseDate" }
        ],
        [
          { "apiName": "Amount" },
          {
            "apiName": "Competitor__c",
            "visibility": { "Type": { "operator": "=", "value": "New Business" } }
          },
          { "apiName": "OwnerId" }
        ],
        [
          { "apiName": "Description", "colSize": 2 },
          { "emptyBlock": true }
        ]
      ]
    }
  ]
}
```

</details>

<details>

<summary>Case Details (section readOnly + field visibility)</summary>

```json
{
  "density": "comfy",
  "sections": [
    {
      "name": "caseDetails",
      "label": "Case Details",
      "active": true,
      "cols": 2,
      "readOnly": {
        "Status": { "operator": "in", "value": ["Closed", "Resolved"] }
      },
      "rows": [
        [
          { "apiName": "Subject" },
          { "apiName": "Priority" }
        ],
        [
          {
            "apiName": "SLA__c",
            "coloring": [
              { "color": "#f7b267", "exp": { "SLA__c": { "operator": "=", "value": "At Risk" } } }
            ]
          },
          {
            "apiName": "Escalated__c",
            "visibility": { "Priority": { "operator": "=", "value": "High" } }
          }
        ],
        [
          { "apiName": "Description", "colSize": 2 }
        ]
      ]
    }
  ]
}
```

</details>

## CSS tips

<details>

<summary>Fix: Prevent Input Validation Error Bumps</summary>

{% code expandable="true" %}

```css
.THIS .slds-form-element__help {
    min-height: 20px;
}
```

{% endcode %}

</details>

<details>

<summary>Enforce Read-Only Mode (Hide Edit Icon)</summary>

```css
.THIS .inline-edit-trigger {
    display: none;
}
```

</details>


# Record KPI

GridMate provides a component to display number or percentage values in a graphical view.

In this tutorial, we will setup a Record KPI of the opportunity Amount and Opportunity. Below is a quick demo on how to configure the KPI components.

{% embed url="<https://youtu.be/vkD3I7myb-Y>" %}
GM - Record Kpi
{% endembed %}

```coffeescript
{
   "sections": [
      {
         "name": "opportunityKPIList",
         "label": "Opportunity KPI",
         "active": true,
         "cols": 3,
         "rows": [
            [
               {
                  "apiName": "ExpectedRevenue",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPICurrencyFieldLWC",
                     "attributes": {
                        "color": "red",
                        "radius": "15rem",
                        "thickness": "2rem"
                     }
                  }
               },
               {
                  "apiName": "Amount",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPICurrencyFieldLWC",
                     "attributes": {
                        "color": "#78b0fd",
                        "radius": "10rem",
                        "thickness": "0.5rem"
                     }
                  }
               },
               {
                  "apiName": "Probability",
                  "managedComponent": true,
                  "componentDef": {
                     "component": "gmpkg:kPIPercentageFieldLWC",
                     "attributes": {
                        "color": "#45c65a",
                        "radius": "15rem",
                        "thickness": "2rem"
                     }
                  }
               }
            ]
         ]
      }
   ]
}
```

As you can see, KPI component is used with the [GM - Record Layout ](/package-reference/components-library/gm-record-layout)component.  We configured three Opportunity fields as KPI : Expected Revenue, Amount and Probability. &#x20;

As of today we support tow KPI: **Currency** and **Percentage**.

### Currency KPI

```coffeescript
{
   "apiName": "ExpectedRevenue",
   "managedComponent": true,
   "componentDef": {
      "component": "gmpkg:kPICurrencyFieldLWC",
      "attributes": {
         "color": "red",
         "radius": "15rem",
         "thickness": "2rem"
      }
   }
}
```

* **component**: gmpkg:kPICurrencyFieldLWC
* **color:**  Ring coloring (default value is #0176d3)
* **radius :** Ring size (default value is 10rem)
* **thickness**: Ring thickness (default value is 1.5rem)

### Percentage KPI

```coffeescript
{
   "apiName": "Probability",
   "managedComponent": true,
   "componentDef": {
      "component": "c:kPIPercentageFieldLWC",
      "attributes": {
         "color": "#45c65a",
         "radius": "15rem",
         "thickness": "2rem"
      }
   }
}
```

* **component**: gmpkg:kPIPercentageFieldLWC
* **color:**  Ring coloring (default value is #0176d3)
* **radius :** Ring size (default value is 10rem)
* **thickness**: Ring thickness (default value is 1.5rem)


# Field Path

GridMate provides a component to deal with paths. Unlike Salesforce Standard Path, **GM - Field Path** is not related to a specific path. The component can be used for many fields on the same object without any limitation. Also the stages can be customized to group different values under the same umbrella.&#x20;

In this tutorial, we will setup a path for the case status. Below is a quick demo on how to configure the **GM - Field Path** component.

{% embed url="<https://youtu.be/ltq_J3IAjOs>" %}
GM - Field Path
{% endembed %}

{% hint style="info" %}
The [configuration wizard](/advanced-guides/grid-configuration#kanban-stages-property) could be used to generate the **Path Stages** property. Below is the stages configured for the demo.
{% endhint %}

```coffeescript
[
   {
      "label": "New",
      "filter": {
         "Status": {
            "operator": "in",
            "value": "('New')"
         }
      }
   },
   {
      "label": "Working On",
      "filter": {
         "Status": {
            "operator": "in",
            "value": "('Escalated','Investigating')"
         }
      }
   },
   {
      "label": "On Hold",
      "filter": {
         "Status": {
            "operator": "in",
            "value": "('On Hold')"
         }
      }
   },
   {
      "label": "Closed",
      "filter": {
         "Status": {
            "operator": "in",
            "value": "('Closed')"
         }
      }
   }
]
```


# Map Record

GridMate provides a component to display any location on Google Maps without leaving the record page. It supports Place and Street view.

In this tutorial, we will setup a Google Maps view of the account billing address. Below is a quick demo on how to configure the **GM - Google Map Record** component.

{% embed url="<https://youtu.be/5BpVlZ4QzjA>" %}
GM - Google Map Setup
{% endembed %}

Below is a quick demo of map component where the user can see the location of an account and navigate around without leaving the record page!

{% embed url="<https://youtu.be/q30o_mFT294>" %}
GM - Google Map Demo
{% endembed %}

{% hint style="info" %}
**Place Fields** property is ',' separated list of fields to build the address. It's not necessary the billing address fields.
{% endhint %}

{% hint style="info" %}
If the street view is not showing, [Enable Maps and Location Services](https://help.salesforce.com/s/articleView?id=sf.ls_provide_maps.htm\&type=5) to make sure content is displayed correctly."
{% endhint %}


# Map List

GridMate offers a convenient feature that allows users to map multiple records for any object (Standard or Custom). The **GM - Map List** component provides and list view to filter records and take mass/record actions.

In this tutorial, we will show how to configure The **GM** - **Map List** component to map the accounts based on the billing addres&#x73;**.**

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

To make sure having only geocoded accounts,  we used the filter below:

```json
{
    "BillingLatitude": {
        "operator": "!=",
        "value": null
    }
}
```

The **Marker Coloring** configuration used in this demo is based on the account type. See below:

```json
[
    {
        "color": "#75c452",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Customer"
            }
        }
    },
    {
        "color": "#f2b016",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Prospect"
            }
        }
    },
    {
        "color": "#4d94ff",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Partner"
            }
        }
    },
    {
        "color": "#663399",
        "exp": {
            "Type": {
                "operator": "=",
                "value": "Reseller"
            }
        }
    }
]
```

For search around, we use GeoApify with maximum radius of 500km. See below:

```json
{
    "unit": "km",
    "distance": "500",
    "autoComplete": {
        "autoCompleteHandler": "GeoApifyAutoCompleteHandler"
    }
}
```

{% hint style="info" %}
The around search unit could be **km** or **mi**.
{% endhint %}

{% hint style="info" %}
[Mass/Record action](/advanced-guides/actions-library) Global can be configured based on requirement. We support quick actions or call a flow actions.
{% endhint %}

Below is a quick demo of **Map Explorer** where the user can see visualize accounts, search, filter and navigate around without leaving the record page. We can also edit the records and trigger quick actions like mass assign based on the trigger.

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

## Custom Icon (SVG)

To enable the **Custom Icon** feature, simply navigate to **Setup** and follow these steps:

1. Go to **Static Resources** and click **New**.
2. Set a **Name** for your resource.
3. Upload your **SVG file**.
4. Set the cache control to **Public**.
5. Click **Save**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fkvybu0MCrc0z669kE3lH%2FScreenshot%202026-02-25%20at%2018.28.29.png?alt=media&amp;token=a05a801e-5d6e-43eb-8caa-9f45128ec13e" alt=""><figcaption></figcaption></figure>

Below is a step-by-step guide to configure the **Custom Icon** feature 👇

{% embed url="<https://youtu.be/gT88X8-XF1I>" %}


# Gantt Chart

**GM - Gantt Chart** component provides clarity in complex project timelines filled with numerous tasks, shifting deadlines, and overlapping dependencies. A Gantt chart significantly helps by allowing you to see the bigger picture while keeping track of the details. With GridMate’s Gantt Chart component, this clarity comes right into your projects no need to switch between spreadsheets or external tools, as everything remains connected to your live data.

The component provides a set of actions that can be performed by the end-user to update the project plan. Those actions are visible at the top of the component in the toolbar:point\_down:&#x20;

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FZDZmXGZGkR1uHihLPzZA%2FGantt%20Chart.png?alt=media&amp;token=65c5594f-c64f-40a6-aa47-d6b41fd91049" alt=""><figcaption></figcaption></figure>

{% columns fullWidth="false" %}
{% column width="91.66666666666669%" %}

### **ToolBar**

1. **Export** : A toolbar menu offering options to save your task data as a file. \
   Includes: **Print** (opens a browser print/PDF dialog), **Export as CSV** (downloads task data as a comma-separated file), and **Export as Excel** (downloads an Excel workbook with formatting, frozen header row, outline grouping, and auto column widths).
2. **Refresh:** Reloads all chart data from Salesforce without closing the chart or losing your current view.
3. **Expand** :Expands a parent task to reveal its children (see also Expand All).
4. **Toggle Right Panel:** Shows or hides the task details editor panel on the right side of the chart.
5. **Toggle Left Panel:** Shows or hides the task tree and filters panel on the left side of the chart.
6. **Horizontal Scroll:** Enables automatic horizontal scrolling to keep the current selection visible as you edit. Useful when viewing narrow time windows or deep task hierarchies.
7. **Overdue:** Highlights tasks whose end date has passed the current date and whose progress is less than 100%. Toggle on/off to flag at-risk items with an amber background in both the task list and chart.
8. **Critical Path:** Highlights the longest zero-slack dependent chain of tasks that determines the project's minimum completion date. Any slip on a critical task delays the project end date. Toggle on/off to focus on schedule-critical work.
9. **Delete:** Removes all selected rows from the chart and Salesforce. Available only when rows are selected and deletion is permitted.
10. **Redo:** Restores the last undone action. Disabled when there are no actions to redo.
11. **Undo:** Reverses the last action. Disabled when there are no changes to undo.
12. **Save:** Commits all pending changes to Salesforce. Disabled until unsaved changes exist. Displays the count of pending edits in parentheses (e.g., "Save (3)").
13. &#x20;**Zoom In:** Increases detail to show a narrower time window, moving through finer views (day → week → month → year). Disabled at the finest level.
14. &#x20;**Zoom Out:** Decreases detail to show a broader time window, moving through coarser views (year → month → week → day). Disabled at the coarsest level.
15. &#x20;**View:** A selector to choose between Day, Week, Month, Year, or Full (auto-fit) time scales.
16. &#x20;**Date Picker:** A calendar input that lets you select a reference date to center the visible timeline. Valid range is constrained by the project's earliest and latest task dates.
17. &#x20;**Create a Baseline:** Captures the current schedule as a new named snapshot, stored in Salesforce. Disabled while unsaved changes exist. Each baseline records every task's start date, end date, and progress percentage.
18. &#x20;**Select Baseline:** A dropdown listing all saved baselines plus a "None" option. Selecting a baseline overlays neutral gray reference bars beneath current task bars for variance comparison.
19. **Scheduling Mode:** Controls how the chart recalculates task dates when dependencies change. Three modes: **MS Project** (dependency-aware but respects your placement), **Auto** (fully automatic re-anchoring), and **Manual** (no automatic rescheduling; violations flagged but not enforced).
20. **Move Left (Outdent):** Promotes the selected row(s) out one level in the hierarchy. Disabled if already at the top level.
21. **Move Right (Indent)**: Nests the selected row(s) under the row above as children. Disabled if the row above is not a valid parent.
22. **Move Down:** Shifts the selected row(s) down within their parent. Disabled if already at the bottom or reordering is not permitted.
23. **Move Up:** Shifts the selected row(s) up within their parent. Disabled if already at the top or reordering is not permitted.
24. **Collapse All:** Collapses all parent tasks to hide their children.
25. **Expand All:** Expands all parent tasks to show their children.

### Edit Panel

26. **Delete:** Removes all selected rows from the chart and Salesforce. Available only when rows are selected and deletion is permitted.
27. **Dependencies:** Links between tasks that enforce scheduling relationships (predecessor → successor). Supports four link types: Finish-to-Start (FS), Start-to-Start (SS), Finish-to-Finish (FF), and Start-to-Finish (SF), with optional lag or lead time.
28. **Assignees:** A task type that acts as a container, automatically rolling up its children's dates and progress. Start/end dates are read-only and derived from the earliest child start and latest child end. A task becomes a Summary automatically when it gains children.
29. &#x20;**Details:** The right panel tab for editing a task's core properties (fields, dates, type). Includes a type switcher (Task / Milestone / Summary) and editable fields. Summary task date fields are locked since they are derived from children.
30. **Summary:** A task type that acts as a container, automatically rolling up its children's dates and progress. Start/end dates are read-only and derived from the earliest child start and latest child end. A task becomes a Summary automatically when it gains children.
31. &#x20;**Milestone:** A zero-duration task type rendered as a diamond marker on a single date, representing an event, deadline, or checkpoint. Converts to a Task if its end date is set to differ from its start.
32. &#x20;**Task:** The standard work unit, rendered as a draggable bar spanning a defined start and end date. Duration is multi-day or single-day and can be edited by dragging/resizing.
33. &#x20;**Split View:** Refers to the layout where both the left panel (task grid/tree) and the right panel (editor) are visible simultaneously alongside the timeline.

### TimeLine

34. **Segment:** A work-time block defined by a start and end date, used to exclude non-working periods (weekends, holidays) from task scheduling. Configured in the Rules tab under Segment Rules.
35. &#x20;**Dependencies :** The right panel tab listing a task's predecessors and successors, with options to add, edit lag/lead, and delete dependency links.
36. **Deadline End:** A "Target End" deadline rule representing a preferred finish boundary. Unlike a hard constraint, it doesn't lock the schedule but signals the intended end date.
37. **Deadline Start:** A "Target Start" deadline rule representing a preferred start boundary. Like Deadline End, it is advisory rather than enforced.

### Table View

38. **Action:** A context-dependent operation available on a task or dependency, such as Insert Before, Insert After, Add Child, or Delete, typically accessible via the right-click context menu on the timeline.
39. **Active Filter :** A filter currently applied to the task grid. When active, a filter-summary row appears in the grid header (e.g., "= Active", "contains 'bug'") and a Clear All Filters option is displayed.
40. **Progress:** The completion percentage of a task (0–100%). Can be edited by dragging the progress handle inside a task bar, or via the Details/inline editor. Parent/summary progress is automatically rolled up from children.
41. **End Date:** The date a task is scheduled to finish. Editable on regular tasks via drag, resize, or the inline editor. Read-only on Summary tasks (auto-calculated from children).
42. **Start Date:** The date a task is scheduled to begin. Editable on regular tasks. Read-only on Summary tasks.
43. **Interactive Filter** : A column-level filter panel with two tabs: a **Values** tab (Excel-style multi-select checklist) and a **Conditions** tab (operator-based filtering for text, number, and date fields). Applies with a 500ms debounce; no manual Apply click needed.
44. **Quick Filter:** A search field that filters tasks by name or other indexed fields, based on the component configuration.
45. **hierarchical:** The hierarchical structure of tasks in the left panel, where parent tasks contain child tasks. Supports expand/collapse, drag-to-reorder, indent/outdent, and inline editing.
    {% endcolumn %}

{% column width="8.333333333333314%" %}

{% endcolumn %}
{% endcolumns %}

## Gantt Chart Setup

When you drag the **GM – Gantt Chart** component into the Salesforce App Builder, you’ll find a list of configurable properties. Let’s go through them one by one :&#x20;

1. Select an Project record and edit the page in the Lightning App Builder.
2. From the components list, drag and drop the component **GM -  Gantt Chart**.
3. The component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the needs of the end-user.
5. To perform a quick configuration, populate the properties below:
   * Title : **Gantt Chart**
   * Icon Name : standard:chart
   * Enable multi-selet : ***Checked***
   * Enable editing : ***Checked***
   * Enable deletion : ***Checked***
   * Enable checklist : ***Checked***
   * Gantt Configuration JSON : [JSON string configuration ](#gantt-chart-relation-configuration)
   * Default View :**monthly**&#x20;
   * Zoom Level : **100**
   * Show only work hours : **Checked**
   * Work Day Start : **8**
   * Work Day End : **17**
   * Hour Span : **1**
   * Work Week Start : **1**
   * Work Week End : **5**
   * First Day of Week : **1**&#x20;
   * Default Displayed Tasks : **10**
   * Slot Size : 100
   * List panel open by default: **Checked**
   * Row Height : 40
   * Left Panel Width (%) : **50**
   * Right Panel Width (%) : **30**

Below is a step by step tutorial to configure the **GM - Gantt Chart** component.👇

{% embed url="<https://youtu.be/BDgu9-NzN9c>" %}

### **Gantt Chart Relation Configuration**

This configuration defines how tasks are displayed and behave in your Gantt chart. The structure consists of an array of task type configurations, where each object represents a different type of task that can be used in your project timeline.

#### **Core Task Properties**

* **taskObjectApiName** : The Salesforce API name of the object that represents this task type.
* **titleFieldName** : The field that contains the task's display name
* **fromDateFieldName** : The field containing the task's start date
* **toDateFieldName** : The field containing the task's end date
* **ownerFieldName** : The field that identifies who owns or is responsible for the task
* **progressFieldName** : The field that tracks completion percentage

#### **Visual Appearance**

* **taskIconName** : The icon displayed for this task type in the Gantt Chart
* **taskColor** : The color used to display this task type (hex color code)

#### **Field Display Configuration**

* **taskDetailFields** : Array of fields shown in the detailed task view
* **taskPopoverFields** : Array of fields shown in hover popover when user hovers over a task
* **taskListFields** : Array of fields shown in the task list view

#### **Hierarchical Structure**

* **parentFieldName** - Defines parent-child relationships between tasks. It contains an array of objects specifying:
  * `parentObjectApiName`: The API name of the parent object
  * `fieldName`: The field that references the parent task
* **orderFieldName** - Field used to determine the display order of tasks
* **acceptedChildren** - Defines what types of child tasks this task type can contain. It contains an array of objects with:
  * `apiName`: The API name of the allowed child task type
  * `multiple`: Boolean indicating if multiple children are allowed

#### **Task Types**

* **taskType** - Array defining the specific types of tasks this configuration supports.

Here’s an example of the **Relation Config** used in this tutorial:&#x20;

{% code expandable="true" %}

```json
{
    "tasksConfig": [
        {
            "taskObjectApiName": "Project__c",
            "titleFieldName": "Name",
            "fromDateFieldName": "StartDate__c",
            "toDateFieldName": "EndDate__c",
            "taskIconName": "standard:folder",
            "taskColor": [
                {
                    "exp": {
                        "Status": "Completed"
                    },
                    "color": "#04844b"
                },
                {
                    "exp": {
                        "Status": "in-progress"
                    },
                    "color": "#ff9500"
                },
                {
                    "color": "#ef8c80",
                    "default": true
                }
            ],
            "acceptedChildren": [
                {
                    "apiName": "gmpkg__GanttTask__c",
                    "parentFieldName": "gmpkg__Project__c"
                }
            ]
        },
        {
            "taskObjectApiName": "gmpkg__GanttTask__c",
            "titleFieldName": "Name",
            "fromDateFieldName": "gmpkg__StartDate__c",
            "toDateFieldName": "gmpkg__EndDate__c",
            "progressFieldName": "gmpkg__Progress__c",
            "orderFieldName": "gmpkg__Order__c",
            "taskIconName": "standard:task",
            "taskColor": "#ef8c80",
            "taskDetailFields": [
                "Name",
                "gmpkg__StartDate__c",
                "gmpkg__EndDate__c"
            ],
            "taskPopoverFields": [
                "Name"
            ],
            "taskListFields": [
                "Name"
            ],
            "acceptedChildren": [
                {
                    "apiName": "gmpkg__GanttTask__c",
                    "parentFieldName": "gmpkg__Parent__c"
                }
            ],
            "resourceConfig": {
                "objectApiName": "gmpkg__GanttTaskAssignment__c",
                "taskIdField": "gmpkg__Task__c",
                "resourceField": "gmpkg__Resource__c"
            }
        }
    ],
    "projectConfig": {
        "resourceConfig": [
            {
                "objectApiName": "gmpkg__GanttProjectResource__c",
                "kind": "human",
                "iconName": "standard:user",
                "titleField": "gmpkg__User__r.Name",
                "subtitleField": "gmpkg__User__r.Email",
                "avatarUrlField": "gmpkg__User__r.SmallPhotoUrl",
                "filter": {
                    "gmpkg__ProjectId__c": {
                        "operator": "=",
                        "value": "$recordId"
                    }
                }
            }
        ],
        "expandedLevels": 2
    },
    "dependenciesConfig": {
        "objectApiName": "Custom_Dependency__c",
        "predecessorFieldApiName": "PredecessorId__c",
        "successorFieldApiName": "SuccessorId__c",
        "typeField": {
            "fieldApiName": "Type__c",
            "mapping": {
                "FS": "Finish-Start",
                "SS": "Start-Start",
                "FF": "Finish-Finish",
                "SF": "Start-Finish"
            }
        },
        "lagConfig": {
            "type": {
                "fieldApiName": "LagMode__c",
                "mapping": {
                    "Immediate": "Immediate",
                    "Lag": "Lag by",
                    "Lead": "Lead by"
                }
            },
            "amount": {
                "fieldApiName": "LagAmount__c"
            },
            "unit": {
                "fieldApiName": "LagUnit__c",
                "mapping": {
                    "Days": "days",
                    "Weeks": "weeks"
                }
            }
        }
    }
}
```

{% endcode %}

## ToolBar

The toolbar sits above the Gantt Chart and holds every action you need to view, edit, and save your schedule. Buttons are enabled or disabled based on context — for example, **Delete** only becomes available once rows are selected, and **Save** stays greyed out until there are unsaved changes.

### Data and Changes

| Button      | Description                                                                                                                                                                                                                                                                         |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Refresh** | Reloads all chart data from Salesforce without closing the chart or losing your current view.                                                                                                                                                                                       |
| **Save**    | Commits all pending changes to Salesforce. Disabled until unsaved changes exist, and displays the number of pending edits in parentheses — for example, *Save (3)*.                                                                                                                 |
| **Undo**    | Reverses the last action. Disabled when there is nothing to undo.                                                                                                                                                                                                                   |
| **Redo**    | Restores the last undone action. Disabled when there is nothing to redo.                                                                                                                                                                                                            |
| **Delete**  | Removes all selected rows from the chart and from Salesforce. Available only when rows are selected and deletion is permitted.                                                                                                                                                      |
| **Export**  | A menu of options for saving your task data as a file: **Print** opens the browser print/PDF dialog, **Export as CSV** downloads a comma-separated file, and **Export as Excel** downloads a formatted workbook with a frozen header row, outline grouping, and auto-sized columns. |

### Timeline View

| Button                | Description                                                                                                                                                     |
| --------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Zoom In**           | Narrows the visible time window to show more detail, stepping through finer scales (year → month → week → day). Disabled at the finest level.                   |
| **Zoom Out**          | Widens the visible time window to show less detail, stepping through coarser scales (day → week → month → year). Disabled at the coarsest level.                |
| **View**              | A selector for the timeline scale: **Day**, **Week**, **Month**, **Year**, or **Full**, which auto-fits the entire project into the visible area.               |
| **Date Picker**       | A calendar input for choosing a reference date to centre the timeline on. The selectable range is bounded by the project's earliest and latest task dates.      |
| **Horizontal Scroll** | Enables automatic horizontal scrolling so the current selection stays visible as you edit. Useful when working in narrow time windows or deep task hierarchies. |

### Layout

| Button                 | Description                                                                   |
| ---------------------- | ----------------------------------------------------------------------------- |
| **Toggle Left Panel**  | Shows or hides the task tree and filters panel on the left side of the chart. |
| **Toggle Right Panel** | Shows or hides the Edit Panel on the right side of the chart.                 |
| **Expand All**         | Expands every parent task in the tree to reveal all children.                 |
| **Collapse All**       | Collapses every parent task so only top-level rows remain visible.            |

### Highlighting

| Button            | Description                                                                                                                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Overdue**       | Highlights tasks whose end date has passed while progress is still below 100%. When enabled, at-risk items are flagged with an amber background in both the task list and the chart.      |
| **Critical Path** | Highlights the longest zero-slack chain of dependent tasks — the sequence that determines the project's minimum completion date. Any slip on a critical task pushes the project end date. |

### Baselines

A baseline is a saved snapshot of your schedule, used to compare the plan against reality as work progresses.

| Button                | Description                                                                                                                                                                                 |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create a Baseline** | Captures the current schedule as a new named snapshot stored in Salesforce, recording every task's start date, end date, and progress. Disabled while unsaved changes exist, so save first. |
| **Select Baseline**   | A dropdown listing all saved baselines, plus a **None** option. Selecting one overlays neutral grey reference bars beneath the current task bars so you can see variance at a glance.       |

### Scheduling

| Button              | Description                                                                                                                                                                                                                                                                             |
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Scheduling Mode** | Controls how the chart recalculates task dates when dependencies change. **MS Project** is dependency-aware but respects where you place a task. **Auto** re-anchors tasks fully automatically. **Manual** applies no automatic rescheduling — violations are flagged but not enforced. |

### Reordering

These actions apply to the selected row and change its position within the task hierarchy.

| Button         | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| **Move Up**    | Moves the selected task one position earlier among its siblings. |
| **Move Down**  | Moves the selected task one position later among its siblings.   |
| **Move Right** | Indents the task, making it a child of the row above.            |
| **Move Left**  | Outdents the task, promoting it one level up in the hierarchy.   |

{% hint style="info" %}
&#x20;Indenting a task turns its new parent into a **Summary** task, whose dates and progress are then rolled up from its children.
{% endhint %}

### Filters

| Button                 | Description                                                                                                                                                                   |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Quick Filter**       | A saved filter you can apply to the task list in one click.                                                                                                                   |
| **Interactive Filter** | A filter built on the fly from the values in a column, letting you narrow the task list without a saved definition.                                                           |
| **Active Filter**      | Any filter currently applied. A filter-summary row appears in the task list header — for example, *= Active* or *contains "bug"* — along with a **Clear All Filters** option. |

{% hint style="info" %}
Stacking an interactive filter on top of an existing filter can return an empty task list, since the two conditions are combined. If the chart looks empty after filtering, clear all filters and reapply one at a time.
{% endhint %}

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

## Edit Panel

The Edit Panel is the panel on the right side of the Gantt Chart. It is where you review project health and edit the properties of individual tasks without leaving the timeline.

Use **Toggle Right Panel** in the toolbar to show or hide it.

The panel is context sensitive:

* When no task is selected, it displays the **project overview**.
* When a task is selected, it switches to the **task editor**, organized into tabs.

### Project Overview

Selecting the project row or deselecting all tasks displays a summary of the whole project.

| Element          | Description                                                                                         |
| ---------------- | --------------------------------------------------------------------------------------------------- |
| Task breakdown   | The number of tasks in each status: **Done**, **In Progress**, and **New**.                         |
| Milestones       | The total number of milestones in the project.                                                      |
| Overdue          | The number of tasks whose end date has passed while progress is below 100%.                         |
| Progress slider  | Drag to set the project's overall completion percentage. The breakdown above updates automatically. |
| Mark as complete | Sets the project to 100% complete in a single click.                                                |

### Details

The **Details** tab is where you edit a task's core properties.

**Task type switcher** : Convert the selected record between the three task types:

* **Task** : the standard work unit, drawn as a bar spanning a start and end date.
* **Milestone** : a zero-duration marker drawn as a diamond on a single date, used for events, deadlines, and checkpoints.
* **Summary** : a container that rolls up the dates and progress of its children. A task becomes a Summary automatically as soon as it gains children.

**Fields** : Name, start date, end date, progress, and any additional fields exposed in your Gantt configuration.

{% hint style="info" %}
On a Summary task, the start and end dates are read-only. They are derived from the earliest child start date and the latest child end date.
{% endhint %}

### Dependencies

The **Dependencies** tab lists every link attached to the selected task, split into **predecessors** (tasks that come before) and **successors** (tasks that come after).

From here you can:

* Add a new dependency by selecting the linked task and the dependency type Finish-to-Start, Start-to-Start, Finish-to-Finish, or Start-to-Finish.
* Apply a **lag** to push the linked task later, or a **lead** (a negative lag) to pull it earlier. Lag is set as an amount plus a unit, such as 2 days or 1 week.
* Delete an existing link.

Dependencies can also be created directly on the timeline by dragging from the edge of one task bar to another.

### Assignees

The **Assignees** tab manages who is allocated to the selected task. Search the project resource pool, then add or remove resources as needed.

{% hint style="info" %}
On a Summary task, the assignee list is read-only and shows the resources rolled up from its children.
{% endhint %}

### Rules

The **Rules** tab holds the scheduling rules that govern when a task can be worked on.

#### Segment Rules

A segment is a work-time block defined by a start and end date. Segments let you exclude non-working periods weekends, holidays, or planned shutdowns so they are not counted in a task's duration.

#### Deadlines

Deadlines mark a preferred boundary rather than a fixed one. **Target Start** signals the intended start date and **Target End** the intended finish date. Neither locks the schedule; they are advisory and simply flag the intent.

#### Date Constraints

Date constraints fall into two categories.

**Hard locks** pin the task to an exact date, regardless of any other schedule changes. Marked with a red edge tick.

* **MSO** : Must Start On : task start must equal this exact date
* **MFO** : Must Finish On : task end must equal this exact date

**Range constraints** set a boundary instead of a fixed date, leaving the scheduler some flexibility. Marked with an amber edge tick.

* **SNET** : Start No Earlier Than : task start must be on or after this date
* **SNLT** : Start No Later Than : task start must be on or before this date
* **FNET** : Finish No Earlier Than : task end must be on or after this date
* **FNLT** : Finish No Later Than : task end must be on or before this date

How strictly constraints are enforced depends on the active **Scheduling Mode**. In Manual mode, violations are flagged but not corrected.

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

## Task Scheduling Mode

Scheduling mode controls what happens when you move a task. It determines whether the Gantt Chart records your move as a **date constraint** pinned to that task, or as an adjustment to the **dependency** linking it to its predecessor.

The mode is set from the **Scheduling Mode** button in the toolbar and applies to the whole chart, not to individual tasks.

### Available Modes

<table><thead><tr><th width="137.28125">Mode</th><th>Moving a task</th><th>What drives the schedule</th></tr></thead><tbody><tr><td><strong>MS Project</strong></td><td>Sets a date constraint on the task</td><td>Constraints take priority over dependencies</td></tr><tr><td><strong>Auto</strong></td><td>Adjusts the lag or lead on the task's dependency</td><td>Dependencies remain in control</td></tr><tr><td><strong>Manual</strong></td><td>Applies your dates as entered</td><td>You do  the chart does not reschedule on your behalf</td></tr></tbody></table>

Choose **MS Project** when you need individual tasks to hold fixed dates. Choose **Auto** when you want the dependency chain to drive the schedule and downstream tasks to shift automatically. Choose **Manual** when you want full control over task dates and no automatic rescheduling.

### MS Project Mode

In this mode, moving a task manually sets a date constraint on it. The constraint that gets applied depends on which dates you change.

<table><thead><tr><th width="275.8602294921875">What you change</th><th>Constraint applied</th></tr></thead><tbody><tr><td>Start date</td><td><strong>SNET</strong> — Start No Earlier Than</td></tr><tr><td>Finish date</td><td><strong>FNET</strong> — Finish No Earlier Than</td></tr><tr><td>Task bar position </td><td><strong>SNET</strong> — Start No Earlier Than</td></tr></tbody></table>

Once a constraint is in place, it governs where the task sits. Constraints take priority over dependencies, so the constraint date is honored even when it conflicts with the task's links.

Removing the constraint hands control back to the dependency chain, and the task returns to the position its links dictate.

For the full list of available date constraints, including hard locks and the remaining range constraints, see **Date Constraints** in the Edit Panel section.

### Auto Mode

In this mode, moving a task does not create a constraint. Instead, the Gantt Chart adjusts the lag or lead on the dependency connecting the task to its predecessor. The link stays intact, and the dependency chain stays in control of the schedule.

Because the chain is preserved, moving a task also moves everything downstream of it.

#### Constrained tasks in Auto mode

A task carrying a constraint from earlier work will not move, even in Auto mode. When this happens, a message appears prompting you to force the move.

To force it, hold the **Command** key while dragging.

### Manual Mode

In this mode moving a task neither sets a constraint nor adjusts the dependency, and no other task is rescheduled as a result.

Dependencies and date constraints are still recorded and still visible on the chart they simply are not enforced. Where a task's dates conflict with its links or its constraints, the violation is **flagged but not corrected**, leaving the decision to you.

Use Manual mode when you are laying out a schedule by hand, working with dates fixed by an outside commitment, or drafting a plan before the dependency logic is settled.

### Switching Between Modes

Switching mode changes how future moves are recorded. Constraints already set on tasks are retained, so returning to **MS Project** mode restores constraint-driven scheduling.

{% hint style="info" %}
Whether switching back to MS Project mode repositions tasks that were moved while in Auto mode, or only affects moves made from that point onward.
{% endhint %}

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


# Flow Grids

Flow Grids GridMate provides lightning components to deal with data tables in flows. We provide components to view/select and edit a collection of records.&#x20;

In this tutorial, we will setup a flow to select a list of contact  and add them as list of contact roles with the ability to set the role of each contact from the flow.

![Mass Add Contact Role Flow](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FZ5NXJ7kV1dZX4cFUL26C%2FScreenshot%202021-12-12%20at%2013.34.50.png?alt=media\&token=635331ee-c8e2-4dc9-b0c4-f77b7300ff1c)

This flow is launched from an **Opportunity** record page by passing the current record Id. We get the opportunity details using the passed **recordId**.&#x20;

The opportunity record is used to get the opportunity account contacts. The list of contacts is then converted to a JSON collection and passed to **GM - Flow View Grid** component.

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FpUEqggURBtpseTWj30SM%2FScreenshot%202021-12-12%20at%2013.42.50.png?alt=media\&token=4b21d06a-5f79-4a9f-af2b-2b12ee81dc2d)

**GM - Flow View Grid** requires at least the following attributes:

* **API Name**: the API name of the component in the flow.
* **Related Object Name**: the API name of the displayed object (Contact).
* **FieldSet Nadme**: the API name of the fieldSet of the displayed object.
* **Custom Label**: the label of the grid. If this property is empty, the fieldSet label will be used.
* **Candidates**: JSON collection of records to display. JSON collection conversion from an SObject collection is handled by **GM - Json from Collection** Apex action. This action is a part of GridMate package.
* **Filter**:  JSON expression to filter the records. This option doesn’t require a **Get Records** to filter the records. We recommend using **candidates** option only if the filtering logic is too complex.

**Select Contacts** screen displays a grid where the user can see the records and select a subset to add as an **Opportunity Contact Role.**&#x20;

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FDmuAcTTJquaDhBH970q9%2FScreenshot%202021-12-12%20at%2014.35.20.png?alt=media\&token=57430ff2-7d92-4069-aa15-904a2cd2315f)

{% hint style="info" %}
When a flow contains more than one screen, to save the selected records, they should be saved in flow variable and passed back to **GM - Flow View Grid.** To achieve this, you should follow the steps below:

* Create a collection of string : **contactIdList**
* On the component properties, go Advanced and check Manually assign varaibles
* Set  **22.Selected Id(s)** to contactIdList
* Check Use values from when the user last visited this scree under Revisited Screen Values section.
  {% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fa43d1nSACzu2rme3pej7%2FScreenshot%202023-07-09%20at%2011.08.53.png?alt=media&amp;token=d71fe9ad-3761-4209-afde-cf0e15456c03" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F1Vuby3FrRN2OnZslMXkv%2FScreenshot%202023-07-09%20at%2011.09.11.png?alt=media&amp;token=6a312cf3-e025-4580-a560-1a1cc70776e4" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FdxKnywhpDV5koYZszR76%2FScreenshot%202023-07-09%20at%2011.09.21.png?alt=media&amp;token=b7ac7bce-1a58-48f4-859f-4741d8f48773" alt=""><figcaption></figcaption></figure>

The list of selected records is converted to an SObject collection. SObject collection conversion from an JSON collection is handled by **GM - Collection from Json** Apex action. This action is a part of GridMate package.

We iterate on the contact collection to create the corresponding opportunity contact roles and save them into Salesforce.

The last step of our flow is to be able to edit the contact roles or completely delete them. Editing a collection of records is handled by **GM - Flow Edit Grid** component.

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FmnKA6YVjvPzXWdU7PdWg%2FScreenshot%202021-12-12%20at%2014.44.25.png?alt=media\&token=fa10a57c-7cc7-4403-98d8-9079207d7df3)

**GM - Flow Edit Grid** requires at least the following attributes:

* **API Name**: the API name of the component in the flow.
* **Related Object Name**: the API name of the displayed object (OpportunityContactRole).
* **FieldSet Nadme**: the API name of the fieldSet of the displayed object.
* **Custom Label**: the label of the grid. If this property is empty, the fieldSet label will be used.
* **Candidates**: JSON collection of records to display if the filter property is not used.
* **Filter**:  JSON expression to filter the records. We recommend using a formula to build the expression as below.

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fqbu8HHkT4HRO8pCPPVpz%2FScreenshot%202021-12-12%20at%2014.47.19.png?alt=media\&token=85485f67-fcc5-44b2-a97b-302671a9157f)

* **Save Records**: Set this property to True if you want to save the records to Salesforce once the user hits **Next**/**Finish**. If not, you can get the updated records from the component and do the update using an **Update Records** component.

{% hint style="warning" %}
**GM - Flow Edit Grid** implements a flow action bar, thus the component should be in the bottom of the screen and standard header should be hidden.
{% endhint %}

Below is a quick demo of the final version of our flow where the user can smoothly add Opportunity Contact Roles with few clicks!

{% embed url="<https://youtu.be/Dd_MCP__UNw>" %}
**GM - Flow Edit Grid**
{% endembed %}

## Drag To Fill

The **Drag to Fill** feature in the Flow Grid component enhances data entry by allowing users to **quickly apply a single value across multiple cells**. Users can simply enter the value once and drag, similar to traditional spreadsheets.

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


# Utility Bar Grid

**GM - FieldSet Grid**, **GM - ListView Grid** and **GM - RelatedList Grid** can be embedded as a utility bar item. Below is a quick demo on how to configure an Open Task utility bar using **GM - FieldSet Grid**.

{% embed url="<https://youtu.be/yc2u0FQUcgE>" %}
Gridmate - Utility Bar Grid Setup
{% endembed %}

In our example, we configured the utility bar item properties (Label, Icon, Width and Height)

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FuqXY8UitZBt5QEoUSgI7%2FScreenshot%202021-12-12%20at%2018.57.08.png?alt=media\&token=62f1290c-bfdc-4d42-aacf-8c47638d4aff)

We configured the **GM - FieldSet Grid** properties same as configuring it on the Lightning App Builder. We added a custom field Marker on the Task object to highlight the task based on the priority.&#x20;

The column style is set to make the marker field short. The tasks are filtered to see only open one and sorted by due date. We configured an autolaunched flow action to mark tasks as completed.

```coffeescript
[
   {
      "name": "markcomplete",
      "label": "Mark as Complete",
      "icon": "utility:check",
      "component": "gmpkg:DataGridCallFlowComponent",
      "attributes": {
         "flowName": "Complete_Task",
         "idListParam": "idList",
         "autolaunched": true
      }
   }
]
```

Finally we set the coloring configuration based the priority.

```coffeescript
{
   "Marker__c": [
      {
         "color": "#F08D8D",
         "exp": {
            "Priority": {
               "operator": "in",
               "value": [
                  "High"
               ]
            }
         }
      },
      {
         "color": "#FF9C25",
         "exp": {
            "Priority": {
               "operator": "in",
               "value": [
                  "Normal"
               ]
            }
         }
      },
      {
         "color": "#B0FD9F",
         "exp": {
            "Priority": {
               "operator": "in",
               "value": [
                  "Low"
               ]
            }
         }
      }
   ]
}
```

{% hint style="success" %}
We recommend using the Config. Wizard to configure the utility bar.
{% endhint %}

Below is a quick demo of the final version of our utility bar where the user can smoothly see his open tasks and mark them as completed with few clicks!

{% embed url="<https://youtu.be/r_lwMRaK0Jc>" %}
GM - Utility Bar Grid Demo
{% endembed %}


# Record App Switcher

**GM - Record App Switcher** can be embedded as a utility bar item. Below is a quick demo on how to configure it for smooth app jump.

{% embed url="<https://youtu.be/8T93Vd-mFhk>" %}
**GM - Record App Switcher**
{% endembed %}

The component leverages the Lightning Apps metadata.Only utility bar item properties (Label, Icon, Width and Height) are required.

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FfeTQEt7bmK580NNRxIGK%2FScreenshot%202021-12-13%20at%2018.02.36.png?alt=media\&token=39b94a1b-82df-4bc4-8b10-de5ca5087d8b)

Below is a quick demo of the final version of our utility bar where the user can smoothly switches the Lightning App with 2 clicks!

{% embed url="<https://youtu.be/uUglR2GI9g8>" %}
GM - Record App Switcher Demo
{% endembed %}

{% hint style="warning" %}
If the list of apps is empty, the end user should reorder the apps from the App Launcher as shown in the end of the demo.
{% endhint %}


# Grid - Advanced Configuration

The Config. wizard is an admin tool to easily configure smart grids (GM - RelatedList Grid, GM - ListView Grid, GM - FieldSet Grid...).

With a set of tabs where each tab has a corresponding component property, the wizard produces the property value through a guided configuration process.

{% hint style="info" %}
We suggest opening the same page in the edit mode in a second tab and jump between the two tabs.
{% endhint %}

{% hint style="info" %}
Before you begin:

* The configuration wizard is not available when the lightning page is being edited in the Lightning App Builder.
* The configuration wizard is a runtime component. It’s available only to run from the component quick actions and when the logged user is a GridMate administrator. A GridMate administrator is an admin or a user with GridMate Admin PermissionSet. This PermissionSet is managed by GridMate package.
  {% endhint %}

## **Custom Icon property**

To configure the **Custom Icon** property.

1. Launch the Configuration Wizard by clicking on the **Configure icon**.
2. Select the **Custom Icon** tab.
3. Select the icon required from the list displayed and scroll to the bottom of the **Custom Icon** tab.
4. The string contained in the Custom Icon text box can be used to populate the **Custom Icon** property value of the component.

{% embed url="<https://youtu.be/t_kB8qd5E78>" %}
Config wizard - Custom Icon
{% endembed %}

## Filter property

To configure the **Filter** property.

1. Launch the Configuration Wizard and select the **Filter** tab.
2. Step 1 - Select Filter Fields. From the Available list select the fields which are to be added to the filter, for example, Priority and move them to the Selected list.
3. Step 2 - Define Filter Values. Define the filter values by selecting from the options presented, for example, Priority Equals High
4. Step 3 - Filter Configuration

The Filter Configuration dialog displays the **Filter** text as a JSON string.

{% embed url="<https://youtu.be/3J3NtMZ1aWw>" %}
Config wizard - Filter
{% endembed %}

{% hint style="success" %}
Make sure to enable the **enhanced filter builder** in the custom settings to use the filter property effectively.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FU8OWq8ue0k212apfhB4g%2FScreenshot%202025-07-09%20at%2017.19.25.png?alt=media&#x26;token=180120c6-31b1-4736-81de-0d78887579a4" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For **date/date time** fields, the value could be custom date/date time or relative (TODAY, THIS\_MONTH...). The config. wizard makes it easy to configure relative date filters.
{% endhint %}

## **Sort/Order property**

To configure the **Sort/Order** properties.

1. Launch the Configuration Wizard and select the **Sort/Order** tab.
2. Step 1 - Select Sort Fields. From the Available list select the fields which are to be used to sort the data, for example, Priority and move them to the Selected list. Note: Multiple fields can be selected for the sort.
3. Step 2 - Select Sort Order. Define the sort order by selecting from the options presented, for example, Ascending
4. Step 3 - Sort Configuration

The Sort Configuration dialog displays the Sort and Order text.

These values can be used to populate the **Sort** and **Order** property values of the GridMate component.

{% embed url="<https://youtu.be/7ITACnYir24>" %}
Config wizard - Sort/Order
{% endembed %}

## **Aggregate property**

To configure the **Aggregate** property.

1. Launch the Configuration Wizard and select the **Aggregate** tab.
2. Step 1 - Select Aggregation Fields. From the Available list select the field to be aggregated, for example, Employees and move it to the Selected list. Only numeric fields are relevant for aggregations.
3. Step 2 - Define Aggregate Operations. Define the aggregate operations by selecting from the options presented, for example, Sum
4. Step 3 - **Aggregate** Configuration

The Aggregate Configuration dialog displays the **Aggregate** text.

This value can be used to populate the **Aggregate** property value of the GridMate component.

{% embed url="<https://youtu.be/IbJcFK8QNC4>" %}
Config wizard - Aggregate
{% endembed %}

## **Default Values property**

To configure the **Default Values** property.

1. Launch the Configuration Wizard and select the **Default Values** tab.
2. Step 1 - Select Default Fields. From the Available list select the fields to be set with default values, for example, Account Description, Account Name, Account Type, and move them to the Selected list.
3. Step 2 - Define Default Values. Define the default values by selecting from the options presented.
4. Step 3 - Default Values Configuration

The Default Values Configuration dialog displays the **Default Values** text.

This value can be used to populate the **Default Values** property value of the GridMate component.

The Default Values are used to initialize a record when the user tries to create a new record.

{% embed url="<https://youtu.be/MERNByRr_r4>" %}
Config Wiz - Default Values
{% endembed %}

{% hint style="warning" %}
The fields selected for the default values configuration should contain at least all the required fields for the related object.
{% endhint %}

### Apex Value provider

For complex use cases, an Apex class can provide the default value of a field as a merge field `$APEX.className({params})`, in the same way as for [filters](/advanced-guides/grid-advanced-filtering#using-usdapex). The parameters are an escaped JSON string, and `$recordId` can be used to pass the current record Id.

The provider class should be global and implement the `Callable` interface. GridMate runs it with the `getValue` action when the user creates a new record, and initializes the field with the returned value.

A typical use case is to stamp a unique External Id on every new row, so that a custom cell can create child records linked to the row before it exists. See [Creating Child Records from a Cell](/advanced-guides/grid-custom-column#creating-child-records-from-a-cell).

```json
{
    "ExternalId__c": "$APEX.ActivityExternalIdProvider()"
}
```

```apex
global with sharing class ActivityExternalIdProvider implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getValue') {
            return newUuid();
        }

        throw new ExtensionMalformedCallException('Action not implemented');
    }

    private String newUuid() {
        String hex = EncodingUtil.convertToHex(Crypto.generateAesKey(128));

        return hex.substring(0, 8) +
            '-' +
            hex.substring(8, 12) +
            '-' +
            hex.substring(12, 16) +
            '-' +
            hex.substring(16, 20) +
            '-' +
            hex.substring(20, 32);
    }

    public class ExtensionMalformedCallException extends Exception {
    }
}
```

## **Actions property**

To configure the **Actions** property.

This property can be used to make custom actions available for use on the GridMate component.

1. Launch the Configuration Wizard and select the **Actions** tab.
2. Step 1 - Select Mass Actions. From the Available list, select the **Actions** to be made available from the GridMate component, and move them to the Selected list.
3. Step 2 - **Actions** Configuration

The Actions Configuration dialog displays the **Actions** text. This value can be used to populate the **Actions** property value of the GridMate component.

{% embed url="<https://youtu.be/8NHdIYs2hUA>" %}
Config wizard - Actions
{% endembed %}

{% hint style="info" %}
The actions listed in the available column depend on the quick actions configured as part of the related Salesforce object.
{% endhint %}

## **Search property**

To configure the **Search** properties.

1. Launch the Configuration Wizard and select the **Search** tab.
2. Step 1 - Select **Search** Fields. From the Available list select the fields which are searchable, for example Priority, and move them to the Selected list. Note: Multiple fields can be selected for the search and only text fields (Text, PickList, Phone, Email, URL) are supported.
3. Step 2 - Search Configuration

The Search Configuration dialog displays the **Search**

The value can be used to populate the **Search** property value of the GridMate component.

{% embed url="<https://youtu.be/y7e1-83nLiA>" %}
Config wizard - Search
{% endembed %}

## **ReadOnly Fields property**

To configure the **ReadOnly** **Fields** properties.

1. Launch the Configuration Wizard and select the **ReadOnly** **Fields** tab.
2. Step 1 - Select **ReadOnly Fields**. From the Available list select the fields which should be readonly, for example, Priority and move them to the Selected list.
3. Step 2 - **ReadOnly** Configuration

The ReadOnly Configuration dialog displays the **ReadOnly Fields**

The value can be used to populate the **ReadOnly Fields** property value of the GridMate component.

{% embed url="<https://youtu.be/N13cGJ_xhn4>" %}
Config wizard - Read-Only fields
{% endembed %}

## **Hidden Fields property**

To configure the **Hidden Fields** properties.

1. Launch the Configuration Wizard and select the **Hidden Fields** tab.
2. Step 1 - Select **Hidden Fields**. From the Available list select the fields to hide when creating a new record, for example Account, and move them to the Selected list.
3. Step 2 - **Hidden Fields** Configuration

The Hidden Fields Configuration dialog displays the **Hidden Fields**

The value can be used to populate the **Hidden Fields** property value of the GridMate component.

{% embed url="<https://youtu.be/MERNByRr_r4?feature=shared&t=85>" %}
Config wiz - **Hidden Fields**
{% endembed %}

## **Custom Labels property**

To configure the **Custom Labels** property.

1. Launch the Configuration Wizard and select the **Custom Labels** tab.
2. Step 1 - Select Fields. From the Available list select the field to be renamed.
3. Step 2 - Define Labels. Define the label for each selected field.
4. Step 3 - **Custom Labels** Configuration

The Custom Labels Configuration dialog displays the **Custom Labels** text.

This value can be used to populate the **Custom Labels** property value of the GridMate component.

{% embed url="<https://youtu.be/zB5cKxXQ0OU>" %}
Config wizard - Cunstom Labels
{% endembed %}

## **Column Style property**

To configure the **Column Style** property.

1. Launch the Configuration Wizard and select the **Column Style** tab.
2. Step 1 - Select Fields. From the Available list select the field to be styled.
3. Step 2 - Define Width. Define the width in pixels for each selected field.
4. Step 3 - Style Configuration

The Style Configuration dialog displays the **Column Style** text.

This value can be used to populate the **Column Style** property value of the GridMate component.

{% embed url="<https://youtu.be/tqJdblMSqh0>" %}
Config wizard - Column Style
{% endembed %}

## **Cell Coloring property**

To configure the **Cell Coloring** property.

1. Launch the Configuration Wizard and select the **Cell Coloring** tab.
2. Step 1 – Coloring Setup
3. Select the field to color and the color to apply
4. Select the fields to check for the coloring
5. Define the field values to check
6. Click Add **Coloring** to save the coloring
7. Repeat this process for any field to color
8. Step 2 – Coloring Configuration

The Coloring Configuration dialog displays the **Cell Coloring** text. This value can be used to populate the **Cell Coloring** property value of the GridMate component.

{% embed url="<https://youtu.be/0LBRGPwZRVE>" %}
Config wizard - Cell Coloring
{% endembed %}

## **Group By property**

To configure the **Group By** properties.

1. Launch the Configuration Wizard and select the **Group By** tab.
2. Step 1 - Select **Grouping Fields**. From the Available list select the fields which are to be used to group the data, for example, Priority and move them to the Selected list.
3. Step 2 - **Grouping** Configuration

The Group By Configuration dialog displays the **Group By Fields**

The value can be used to populate the **Group By** property value of the GridMate component.

{% embed url="<https://youtu.be/cfrQI7KlSM8>" %}
Config wizard - Group By
{% endembed %}

## **Kanban Stages property**

To configure the **Kanban Stages** property.

1. Launch the Configuration Wizard and select the **Kanban Stages** tab.
2. Step 1 – Stage Setup
3. Set the name of the stage
4. Select the fields to check for the stage
5. Define the field values to check
6. Click Add **Stage** to save the stage
7. Repeat this process for all the stages
8. Step 2 – Stage Configuration

The Stage Configuration dialog displays the **Kanban Stages** text. This value can be used to populate the **Kanban Stages** property value of the GridMate component.

{% embed url="<https://youtu.be/-BUxITflg6s>" %}
Config wizard - Kanban Stages
{% endembed %}

## **Formulas property**

To configure the **Formulas** property.

1. Launch the Configuration Wizard and select the **Formulas** tab
2. Step 1 – **Formulas** Setup
3. Set the name of the **Formulas**
4. Select the Data Type
5. Choose which fields to use when creating the formula.
6. Define the formula using the fields and functions from the explorer on the left side
7. Click Check Syntax for errors
8. Save the formula
9. Step 2 – **Formulas** Configuration

{% embed url="<https://youtu.be/fMSZ_yV4UC0>" %}
Config wizard - Formulas
{% endembed %}


# Grid - Mass/Record Actions

## **Overview**

The quick actions are a set of actions that can be performed by the end-user to manipulate the data displayed and by admin to configure the grids.

{% hint style="success" %}
The quick actions can be configured using the component properties and the configuration wizard.
{% endhint %}

There are three different types of quick actions:

* **Configuration actions:** Admin action like **Config. Wizard** or **Inline Config**.
* **Global action:** Generic actions that apply on the whole grid without selecting a record.
* **Record action:** Actions to apply when records are selected.

The action icons are visible at the top of the grid in the toolbar :point\_down:.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FqehV4wLb8CW4a3JFNwjj%2FGrid%20Explorer%20(2).png?alt=media&#x26;token=285316e1-8ab0-42ff-890b-91b42a8c2f82" alt=""><figcaption></figcaption></figure>

{% columns fullWidth="false" %}
{% column %}

1. Grid Explorer
2. Global Actions
3. Mass Delete
4. Mass Edit
5. Clone Items
6. Create Item
7. Inline Edit
8. Import Wizard
9. Export
10. Freeze Columns
11. SOQL Query
12. Config Wizard
    {% endcolumn %}

{% column %}
13\. Pagination
14\. Reload Grid
15\. Search Box
16\. Interactive Filter
17\. Share Filter
18\. Clone Filter
19\. Edit Filter
20\. Quick Link Filter
21\. Pin\&Unpin Filter
22\. Select Filter
23\. Split View
{% endcolumn %}
{% endcolumns %}

<table><thead><tr><th width="182">Label</th><th width="409.33333333333326">Description</th><th width="138.66666666666669">Type</th></tr></thead><tbody><tr><td>Select Filter</td><td>Enables the user to create a new filter or apply an existing filter to the data displayed.</td><td>Global</td></tr><tr><td>Quick Link Filter</td><td>Enables the user to create a Quick Link Filter for the selected filter.</td><td>Global</td></tr><tr><td>Pin/Unpin Filter</td><td>Enables the user to pin or unpin the selected filter.</td><td>Global</td></tr><tr><td>Edit Filter</td><td>Enables the user to edit the selected filter.</td><td>Global</td></tr><tr><td>Clone Filter</td><td>Enables the user to clone the selected filter.</td><td>Global</td></tr><tr><td>Search Input</td><td>Enable the user to search for a specific word in the grid.</td><td>Global</td></tr><tr><td>Reload Items</td><td>Reload the entire grid</td><td>Global</td></tr><tr><td>Load more Items</td><td>Loads more items based on page size defined on the grid.</td><td>Global</td></tr><tr><td>Freeze Columns</td><td>Enables the user to define a set number of columns to freeze.</td><td>Global</td></tr><tr><td>Export Items</td><td>Enables the data displayed in the grid to be exported to an Excel or CSV file.</td><td>Global</td></tr><tr><td>Edit items</td><td>Enables inline editing of the data displayed.</td><td>Global</td></tr><tr><td>Create Record</td><td>Enables the user to add a new record.</td><td>Global</td></tr><tr><td>Clone Items</td><td>Clones selected records.</td><td>Record</td></tr><tr><td>Delete Items</td><td>Enables a record to be deleted.</td><td>Record</td></tr><tr><td>Actions</td><td>Dropdown list enabling access to the GridMate provided and also user-created custom actions.</td><td>Record</td></tr></tbody></table>

{% hint style="info" %}
Before implementing any GridMate Actions, ensure you have the GridMate Extensions package installed in your Salesforce Org. Please reach out to our [Support Team](mailto:support@gridmate.io) to obtain the latest package version.
{% endhint %}

{% hint style="info" %}
To execute a **record action** like Clone Items, the user has to select records. Multiple records could be select using SHIFT button + select.
{% endhint %}

## **Create a filter**

To create a new filter.

1. Click on the drop-down **Select Filter** and select **New**
2. The Filter Wizard screen is displayed.
3. To create a filter to show only the cases which have been closed. In **Select Filter** Fields highlight the **Status** field from the available list and click on the right arrow to move it to the selected list.
4. In **Define Filter Values** select **Equal** and **Closed**.
5. In **Filter Configuration** provide a name for the newly created filter. By default, the junction is ‘AND’ between all the selected fields. Update the filter conditions using ‘OR’/’AND’ if necessary in the Filter Value field.
6. Select if you wish to make the filter global and then click **Save**.
7. When the filter is saved successfully, a confirmation dialog will be displayed.
8. Reload the lightning page for the changes to be effective.
9. To use the new filter, reload the lightning page and select the filter list drop-down. The new filter name is displayed.
10. Click the filter name and the data grid will refresh to show the now filtered data.

{% hint style="info" %}
If selecting to make a filter global, the filter will be available across all lightning pages.
{% endhint %}

## **Edit a filter**

To edit an existing filter.

1. Select the filter name from the drop-down list of filters and click on the **Edit Filter** button.
2. The Filter Wizard is presented with the existing filter fields visible.
3. To edit the filter, adjust the filter fields or filter values as required, and click **Save**. The updates to the filter will be saved.

## **Clone a filter**

To clone an existing filter.

1. Select the filter name from the drop-down list of filters and click on the **Clone Filter** button.
2. The Filter Wizard is presented with the existing filter fields visible.
3. To edit the filter, adjust the filter fields or filter values as required, update the name and click **Save**. The cloned filter will be saved as a new record.

## **Delete a filter**

To delete an existing filter.

1. Select the filter name from the drop-down list of filters and click on the **Edit Filter** icon.
2. The Filter Wizard is displayed with the existing filter fields visible.
3. To delete the filter, click **Delete**, a confirmation dialog will be displayed.
4. Click OK to confirm to delete the filter, the filter is deleted.

## Quick Link Filter

To Create a Quick link Filter to existing filter.

1. Choose the desired filter from the dropdown list.
2. Click Quick Link Filter action.
3. Check auto-refresh and specify the update frequency if needed.
4. Click save.

{% embed url="<https://youtu.be/z_-uvtBzk58>" %}
Quick Link Filter
{% endembed %}

## **Pin/Unpin a filter**

To pin/unpin an existing filter.

1. Select the filter name from the drop-down list of filters
2. Click on the **Pin/Unpin** icon.

{% hint style="info" %}
When a filter is pinned, it gets applied each time the grid is loaded. Pinned filters are defined per grid and managed by the end users not by the admin
{% endhint %}

## **Share a filter**

To share an filter. Only owned filter can shared

1. Click on the **Share** action.
2. The sharing dialog is displayed.
3. Add the Users/Groups/Roles with the appropriate sharing (Read only | Read/Write)
4. Click **Submit** to proceed with the selected records.

## **Freeze Columns**

To set the number of columns to freeze in the displayed data grid.

1. Click on the **Freeze columns** icon.
2. The Freeze Column dialog is displayed.
3. Enter the number of columns to freeze.
4. Click **Save**.

{% hint style="info" %}
Columns will be frozen starting from the left-hand side.
{% endhint %}

## **Export Items**

Export the displayed data to an Excel or CSV file. All eligible records are exported not only the displayed ones. GridMate can export till 5K records!

1. Click on the **Export** icon.
2. This will open a dialog allowing the user to select the format (CSV, Excel, Formatted Excel) and the name of the generated file. We can also exclude the recordId from the export.
3. If you want to export only selected records, check **Export only selected records**
4. If you don't want to export Id including lookup fields, check **Do not export record Id(s)**
5. Click **Export** to download the data.

{% hint style="info" %}
**Formatted Excel** keeps the grid's coloring, grouping and totals in the workbook. See [Grid - Advanced Export](/advanced-guides/grid-advanced-export#formatted-excel).
{% endhint %}

## **Edit Items**

The Edit Items function allows the end-user to perform inline editing of the data displayed on the data grid.

1. Click on the **Edit Items** icon.
2. The GridMate data grid will enter edit mode and the user will be able to directly edit the data fields displayed.
3. As the data fields are edited the border of each displayed data field will be highlighted to show it has changed.
4. To save the updates made to the data click **Save**, to cancel the updates click **Cancel**. If the updates are saved a confirmation dialog is displayed. If there is any error because of a trigger or a validation rule, the user gets notified. GridMate handles the errors at row level to easily fix the data.

All changes that are made during the inline editing are handled like a transaction. There are no changes that are saved into the server including record creation and deletion. When a grid is saved, all the changes are applied:

* Create brand new objects
* Update the edited objects
* Delete records marked for deletion

The page is not refreshed when an inline grid is saved. Only the saved grid is reloaded to keep the master grid state the same.

All types of fields are supported except compound fields like addresses. We provide enhanced UI components for Multi PickList, Long Text, and Rich Text fields.

To enhance the performance and the search relevance, we use SOSL instead of SOQL for lookup fields.

To be more aligned with Salesforce UX, GridMate provides the same search dialog for lookup fields. However this feature is not available on Community and Salesforce Professional Edition.

During the inline editing, the end-user can add multiple records at a time. Put the number of the records to add, and hit **Create New Record**.

☝️GridMate handles well dependant picklist fields. The dependent fields should be displayed on the grid.

☝️We support lookup filters for lookup fields and recent items as well. When a lookup field gets the focus, the recent records list is displayed if the user doesn’t enter a search term.

☝️Vertical navigation is available during the inline editing. You can go from up or down using the keyboard shortcuts below:<br>

| Windows                                                      | Mac/Linux                                                      |
| ------------------------------------------------------------ | -------------------------------------------------------------- |
| <ul><li>Down : ALT + k</li><li>Up: ALT + SHIFT + k</li></ul> | <ul><li>Down : CTRL + k</li><li>Up: CTRL + SHIFT + k</li></ul> |

☝️Multi copy paste is available during the inline editing. You can copy paste multiple values on the same column at one time. Almost all the data types are supported including lookup fields. This feature is a must for data capture from Excel files for instance. For lookup fields, GridMate will fetch the id(s) based on the lookup record name.

☝️During inline editing, the end user can reset a field to the original value using keyboard shortcuts below:

| Windows | Mac/Linux |
| ------- | --------- |
| ALT + Z | CTRL + Z  |

The reset value shortcut is available only for the list of fields below:

* Boolean
* String
* Phone
* Email
* Url
* Currency
* Double
* Integer
* Percent
* Date
* Datetime
* Time

## **Create Record**

The Create Record function allows the end-user to create a new record.

Note: When this function is available from the toolbar, please ensure the GridMate component property “Default Values” is set to include the required fields for the object.

1. Click on the **Create Record** icon.
2. The **New Record** dialog is displayed, with the default values presented.
3. Enter the new record data.

When **Submit** is clicked the component creates a new record, populates it with the default values, stores it on the Salesforce back end, and displays it to the user. When the new record has been created, a confirmation dialog is presented.

## **Clone Items**

The Clone Items function enables the cloning of records from the data grid.

1. From the displayed data grid, select at least one record to clone.
2. Click on the **Clone Items** icon.
3. The **Clone** selected items dialog is displayed.
4. Click **Yes** to proceed with the cloning of the selected records
5. When the records have been cloned, a confirmation dialog is displayed.
6. The cloned records are visible on the data grid.

## **Mass Update**

The Mass Update function enables the mass update of records from the data grid.

1. From the displayed data grid, select at least one record to mass update.
2. Click on the **Mass Update** icon.
3. The **Mass Update** dialog is displayed.
4. Select the appropriate fields to update and set the new value for each field
5. Click **Yes** to proceed with the update of the selected records.

When the records have been updated, a confirmation dialog is displayed and the grid is refreshed accordingly.

The Mass Update can be configured as a [bulk action](/advanced-guides/grid-bulk-action) using the action configuration below:

```json
{
    "name": "BulkUpdate",
    "label": "Bulk Update",
    "bulkAction": true,
    "confirmationRequired": true,
    "component": "gmpkg:DataGridBulkUpdateComponent"
}
```

{% hint style="info" %}
This action action can be triggered as a [Bulk Action](/advanced-guides/grid-bulk-action).
{% endhint %}

## **Delete Items**

The Delete Items function enables the removal of records from the data grid.

1. From the displayed data grid, select the records to delete.
2. Click on the **Delete Items** icon.
3. The **Delete** selected items dialog is displayed.
4. Click **Yes** to proceed with the deletion of the selected records.

When the records have been deleted, a confirmation dialog is presented.

## **Custom Actions**

The Actions function enables access to custom quick actions associated with the object to be called and applied to the selected records.

1. From the displayed data grid, select at least one record.
2. Click on the Actions icon.
3. The list of available actions is displayed.
4. Select the appropriate action as required, for example **Update Account**. The user defined action will be presented using the same layout of the quick action.
5. Click Submit to apply the quick action.

Below is an example of a quick action configuration. This configuration can produced by the Config Wizard.

```coffeescript
[
   {
      "name": "Case.gmpkg__Esclate",
      "label": "Esclate",
      "icon": "utility:close",
      "attributes": {
         "density": "comfy"
      }
   }
]
```

* **name**: the API name of the action.
* **label**: the label of the the action.
* **icon**: the SLDS icon of the action. Only [utility family](https://www.lightningdesignsystem.com/icons/#utility) is supported.
* **attributes**: Extra attributes to control the action. Only density is supported as of today. The density is used to override the density of the layout ("compact", "comfy").

## Mass Email Action

GridMate provides a **Mass Email Action**, which can be added to the **Actions** menu and made available to the end-user. When the **Mass Email** action is selected, the following dialog is displayed. The user can select from the available options, compose their message, and either click the **Send** button to send the email **immediately** or choose to **schedule it for a later time**. This added flexibility allows users to plan their communication in advance and ensure timely delivery.

* **From**: From Wide Default Email Address.
* **Recipient**: The field name to use as a recipient. We list only Email, User, Contact and Lead fields.
* **Template**: Use the Lookup to select the email template to send. Only available templates will be listed.
* **Subject**: Email subject. This field is locked when the template is selected.
* **Mail Body**: Email Body. This field is locked when the template is locked.
* **Schedule Send:** Specify a future date and time for the email to be sent.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FEDxWmOQetOY8NzdqwkZP%2FScreenshot%202026-02-11%20at%2022.55.12.png?alt=media&#x26;token=42fb065d-6540-4f5a-ae39-5a81f22d706a" alt=""><figcaption></figcaption></figure>

**Mass Email** action can be configured to preset attributes like **From**, **Recipient**, **Template** and the **default format** of the body. You can leverage this feature to configure predefined email actions.

| Aura            | LWC                | Description                                                                                                                                                                                                                                                |
| --------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `from`          | `defaultFrom`      | Email address of the org-wide email address to preselect in **From**. The address is matched case-insensitively against the addresses the user can send from. When there is no match, **--None--** is selected.                                            |
| `recipient`     | `defaultRecipient` | API name of the field to preselect as **Recipient**.                                                                                                                                                                                                       |
| `lockRecipient` | `lockRecipient`    | Hide the **Recipient** field. The recipient is set by the action.                                                                                                                                                                                          |
| `templateName`  | `defaultTemplate`  | Developer name of the email template to use. Used with `lockTemplate`.                                                                                                                                                                                     |
| `lockTemplate`  | `lockTemplate`     | Lock the **Template** field. The template is set by the action.                                                                                                                                                                                            |
| `canSchedule`   | `canSchedule`      | Enable **Schedule Send**.                                                                                                                                                                                                                                  |
| `defaultFormat` | `defaultFormat`    | Default format of the **Mail Body** (`font`, `size`, `color`, `background`, `align`...). The format is applied when the dialog opens, when the recipient changes and when the template is cleared. It is never applied while a template is used or locked. |

The action below is an example to send a case response to the contact.

{% tabs %}
{% tab title="Mass Email Aura" %}

```json
[
   {
      "label": "Send Case Response",
      "name": "SendCaseResponse",
      "component": "gmpkg:DataGridSendEmailComponent",
      "attributes": {
         "from": "support@acme.com",
         "canSchedule": true,
         "lockRecipient": true,
         "recipient": "ContactId",
         "lockTemplate": true,
         "templateName": "SUPPORTCaseResponsewithSolutionSAMPLE"
      }
   }
]
```

{% endtab %}

{% tab title="Mass Email LWC" %}

```json
[
    {
        "label": "Mass Email LWC",
        "name": "MassEmailLWC",
        "component": "gmpkg/dataGridSendEmailLWC",
        "attributes": {
            "defaultFrom": "support@acme.com",
            "canSchedule": true,
            "lockRecipient": true,
            "defaultRecipient": "ContactId",
            "lockTemplate": true,
            "defaultTemplate": "SUPPORTCaseResponsewithSolutionSAMPLE"
        }
    }
]
```

{% endtab %}
{% endtabs %}

The action below is an example to compose a free email with a default from address and a default format.

{% tabs %}
{% tab title="Mass Email Aura" %}

```json
[
   {
      "label": "Mass Email",
      "name": "MassEmail",
      "component": "gmpkg:DataGridSendEmailComponent",
      "attributes": {
         "from": "support@acme.com",
         "defaultFormat": {
            "font": "verdana",
            "size": "14px",
            "color": "rgb(0, 112, 210)"
         }
      }
   }
]
```

{% endtab %}

{% tab title="Mass Email LWC" %}

```json
[
    {
        "label": "Mass Email",
        "name": "MassEmail",
        "component": "gmpkg/dataGridSendEmailLWC",
        "attributes": {
            "defaultFrom": "support@acme.com",
            "defaultFormat": {
                "font": "verdana",
                "size": "14px",
                "color": "rgb(0, 112, 210)"
            }
        }
    }
]
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
**Mass Email** is available through two implementations depending on the component type:

* **Mass Email (Aura Action)** designed for Aura-based components, this action is compatible with GridMate Aura components.
* **Mass Email (LWC Action)** designed for Lightning Web Components, this action is compatible with LWC components such as the **GM -** **Kanban Board** and the **GM -** **Map List**.
  {% endhint %}

Below is a step-by-step tutorial to configure the **Mass Email Action**.

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

## **Create Contact Role**

GridMate provides a default custom action to create contact roles from **Contact Roles** grid. This action can be added to the Actions menu and made available to the end-user. When the **Create Contact Role** action is selected the following dialog is displayed. The user can select from the contact, assign the right role, and click the **Save** button to save the record.

![Create Contact Role action](https://lh5.googleusercontent.com/Wn67YpA-lEdiywQq-8zverAqEwyYYsWPY-sKlqcu76EWgH9LAThSWI23EVaotQ1oP90b1HIxFUwOLJN6Daxx8ZiWEH6EMpJ7niRbLyNGg7j9BObbpQTeDK71I2LWMOnFMDYU5Omj)

## **Submit for Approval**

1. From the displayed data grid, select at least one record to submit.
2. Click on the **Submit for Approval** action.
3. The submission dialog is displayed.
4. Add your comment and click **Submit** to proceed with the selected records.

GridMate provides a default custom action to submit a list of records for approval. This action can be added to the Actions menu and made available to the end-user.

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
    "label": "Submit for Approval",
    "name": "SubmitForApproval",
    "component": "gmpkg:DataGridSubmitForApprovalComponent"
}
```

{% hint style="info" %}
If the approver should be selected by the end user, the action can be configured to capture the approver. See the example below.
{% endhint %}

```json
{
    "label": "Submit for Approval",
    "name": "SubmitForApproval",
    "component": "gmpkg:DataGridSubmitForApprovalComponent",
    "attributes": {
        "chooseApprover": true
    }
}
```

## **Approve/Reject Records**

GridMate provides a default custom action to approve or reject a list of records. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser. The decision of the approval is defined on the action itself.

1. From the displayed data grid, select at least one record to process.
2. Click on the **Approve or Reject** action.
3. The approval dialog is displayed.
4. Add your comment and click **Approve or Reject** to proceed with the selected records.

Below is an action configuration example to approve the records. This configuration can produced by the Config. Wizard.

```javascript
{
    "label": "Approve Contacts",
    "name": "Approve",
    "component": "gmpkg:DataGridSetApprovalComponent",
    "attributes": {
        "approvalStatus": "Approve"
    }
}
```

Below is an action configuration example to reject the records. This configuration can produced by the Config. Wizard.

```javascript
{
    "label": "Reject Contacts",
    "name": "Reject",
    "component": "gmpkg:DataGridSetApprovalComponent",
    "attributes": {
        "approvalStatus": "Reject"
    }
}
```

## Reassign Approval

GridMate provides a default custom action to reassign approval for a list of records. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser.

1. From the displayed data grid, select at least one record to process.
2. Click on the **Mass Reassign** action.
3. The assignment dialog is displayed.
4. Select the new owner (Internal User/External User or Queue)
5. Click **Submit** to proceed with the selected records.

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```coffeescript
[
    {
        "name": "Mass Reassign",
        "label": "massReassign",
        "component": "gmpkg:DataGridReassignApprovalComponent"
    }
]
```

## **Call Flow**

GridMate provides a default custom action to call a flow on the selected records. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser. The flow to trigger and its parameters mapping is defined on the action itself.

1. From the displayed data grid, select at least one record to process.
2. Click on the **$FlowAction** action.
3. The flow dialog is displayed.
4. Run your flow as usual.
5. The grid is refreshed once the flow is executed

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
    "label": "Mass Convert",
    "name": "MassConvert",
    "component": "gmpkg:DataGridCallFlowComponent",
    "attributes": {
        "flowName": "GM_Mass_Lead_Convert",
        "idListParam": "idList",
        "itemListParam": "itemList",
        "autolaunched": false,
        "successMessage": "Leads converted successfully"
    }
}
```

The **attributes** property is used to define the mapping between the flow parameters and the grid properties:

* **recordIdParam**: the id of the current record
* **idListParam**: the list of selected id(s)
* **itemListParam**: the list of selected items
* **autolaunched**: flag to indicate if the flow is an auto launched process. Auto-launched flows are run in the background and no screen is displayed to the end-user.
* **inputVariables:** Pass through flow variables. With this approach, generic flows can be built and configured based on the needs.
* **successMessage:** Set this property to customise the success message when the flow is executed successfully. This message will be displayed in a toast message.

At runtime, GridMate will instantiate the flow, populate its attributes based on the mapping, and display it to the end-user.

Below is a global action configuration example. Global action are launched without selection a record like create a new record.

For complex flows that needs more real estate, a **modalSize** can be set to **large** for instance.

```javascript
{
      "label": "New Task",
      "name": "newTask",
      "component": "gmpkg:DataGridCallFlowComponent",
      "global": true,
      "modalSize": "large",
      "attributes": {
         "flowName": "GM_CreateTask",
         "recordIdParam": "accountId",
         "autolaunched": false
      }
}
```

Below is another example passing the flow input variables. Note that each flow variable declaration should have a type, name and a value.

```json
  {
        "label": "New Role",
        "name": "NewRole",
        "component": "gmpkg:DataGridCallFlowComponent",
        "global": true,
        "attributes": {
            "flowName": "GM__New_Role",
            "recordIdParam": "recordId",
            "inputVariables": [
                {
                    "type": "String",
                    "name": "status",
                    "value": "active"
                },
                {
                    "type": "Number",
                    "name": "rating",
                    "value": 30
                }
            ]
        }
    }
```

A flow can be also configured as a record action. The **attributes** property configuration is slightly different from a global action:

* **recordIdParam**: the id of the current record
* **itemIdParam**: the Id of the current row
* **autolaunched**: flag to indicate if the flow is an auto launched process. Auto-launched flows are run in the background and no screen is displayed to the end-user.

Below is a flow record action example:

```coffeescript
{
    "name": "CrossSell",
    "label": "Cross Sell",
    "component": "gmpkg:DataGridCallFlowComponent",
    "attributes": {
        "flowName": "gmpkg__CrossSellFlow",
        "recordIdParam": "recordId",
        "itemIdParam": "itemId"
    }
}
```

## **Mass Convert Lead**

GridMate provides a flow to mass convert a list of leads. This flow is available in [GridMate extensions](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t3i000002D9So).

1. From the displayed data grid, select at least one record to convert.
2. Click on the **Mass Convert** action.
3. Complete the lead conversion properties (Account/Contact/Opportunity creation, Record Owner).
4. Submit the flow to convert all the selected leads

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```coffeescript
{
    "label": "Mass Convert",
    "name": "MassConvert",
    "component": "gmpkg:DataGridCallFlowComponent",
    "attributes": {
        "flowName": "GM_Mass_Lead_Convert",
        "idListParam": "idList",
        "itemListParam": "itemList",
        "successMessage": "Leads converted successfully"
    }
}
```

## Multi Clone

The Multi Clone function enables the creation of **N** copies of selected records from the data grid.

1. From the displayed data grid, select at least one record to clone.
2. Click on the **Clone** button.
3. The **Clone** selected items dialog is displayed.
4. Set the number of copies and click **Yes** to proceed with the cloning of the selected records
5. When the records have been cloned, a confirmation dialog is displayed.
6. The cloned records are visible on the data grid.

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
   "name": "MultiClone",
   "label": "Clone",
   "component": "gmpkg:DataGridMultiCopyComponent"
}
```

## **Follow/Unfollow Records**

GridMate provides a default custom action to follow/unfollow a list of records on Chatter. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser.

1. From the displayed data grid, select at least one record to process.
2. Click on the **Follow or Unfollow** action.
3. The confirmation dialog is displayed.
4. Click **Follow or Unfollow** to proceed with the selected records.

Below is a follow action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
   "name": "MassFollow",
   "label": "Follow",
   "component": "gmpkg:DataGridSetFollowComponent",
   "attributes": {
      "followStatus": "Follow"
   }
}
```

Below is an unfollow action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
   "name": "MassUnfollow",
   "label": "Unfollow",
   "component": "gmpkg:DataGridSetFollowComponent",
   "attributes": {
      "followStatus": "Unfollow"
   }
}
```

## **Assign Records**

GridMate provides a default custom action to assign a list of records to a User/Queue. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser.

1. From the displayed data grid, select at least one record to process.
2. Click on the **Assign** action.
3. The assignment dialog is displayed.
4. Select the new owner (Internal User/External User or Queue)
5. Click **Submit** to proceed with the selected records.

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
    "name": "MassAssign",
    "label": "Assign",
    "component": "gmpkg:DataGridMassAssignComponent"
}
```

{% hint style="info" %}
This action action can be triggered as a [Bulk Action](/advanced-guides/grid-bulk-action).
{% endhint %}

## **Share Records**

GridMate provides a default custom action to share a list of records with a User/Group/Role. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser.

1. From the displayed data grid, select at least one record to process.
2. Click on the **Share** action.
3. The sharing dialog is displayed.
4. Add the Users/Groups/Roles with the appropriate sharing (Read only | Read/Write)
5. Click **Submit** to proceed with the selected records.

Below is an action configuration example. This configuration can produced by the Config. Wizard.

```javascript
{
    "name": "MassShare",
    "label": "Share",
    "component": "gmpkg:DataGridMassShareComponent"
}
```

## Reorder Rows

GridMate provides a **Reorder Rows** custom action, enabling you to rearrange grid rows to your **preferred** order.

1. Click on the **Reorder Rows** action.
2. **Rearrange** the rows as needed.
3. Click **Save**

{% embed url="<https://youtu.be/iPyvWP10UdM>" %}
Reorder Rows Demo
{% endembed %}

Below is the action configuration to reorder Product Lines on an Opportunity page.

```json
[
    {
        "name": "sortProducts",
        "label": "Sort Products",
        "component": "gmpkg:DataGridCallLWCComponent",
        "global": true,
        "attributes": {
            "componentDefs": [
                {
                    "component": "gmpkg:sortRecordsLWC",
                    "attributes": {
                        "labelField": "fProductTitle__c",
                        "sortField": "SortOrder",
                        "filter": "{\"OpportunityId\":{\"operator\":\"=\",\"value\":\"$recordId\"}}",
                        "fieldTitle": "Product Name",
                        "tableTitle": "Products",
                        "helpText": "Drag the items into the order you want, and save"
                    }
                }
            ]
        }
    }
]
```

Below is an overview of the mapping between the configuration properties above and the action screen:

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FAcOA0pTPJsDqAAiVas8q%2FGridMate%20-%20Grid%20-%20Reorder%20Rows.png?alt=media&#x26;token=342194fa-a798-44ac-b6aa-825c5d763282" alt=""><figcaption><p><strong>Properties Mapping</strong></p></figcaption></figure>

## **VisualForce Page**

GridMate provides a default custom action to call a visualforce page on the selected records. This action can be added to the Actions menu and made available to the en&#x64;**-**&#x75;ser.

Below is an action configuration example.

```javascript
{
   "name": "VFDemo",
   "label": "VF Demo",
   "vfpage": "https://xxxxx.visualforce.com/apex/ListViewVFP"
}
```

The action above will open the visualforce and pass the list of selected recordId(s). To trigger the page individually on the selected records(multiple tabs), **recordPage** property should set to true as the example below:

```coffeescript
{
   "name": "VFDemo",
   "label": "VF Demo",
   "vfpage": "https://xxxxx.visualforce.com/apex/RecordVFP",
    "recordPage": true
}
```

## Grid Explorer

GridMate provides a Grid Explorer for grid components (GM - RelatedList Grid, GM - ListView Grid, GM - FieldSet Grid, GM - ListView Kanban and GM - FieldSet Kanban). Through the explorer, the end-user is able to:

* Filter the records using **Filters** tab
* Add, remove and reorder columns using **Columns** tab
* Group records using **Grouping** tab

{% hint style="info" %}
The Grid Explorer is available only if the property Enable Explorer is checked on the App Builder. When the Grid Explorer is enabled, the filtering, columns and grouping are stored at the user level. Each user has his own settings. If the admin made any changes to layout/listview/fieldset, all the users should be notified to update their settings.
{% endhint %}

### Filtering

Edit, remove, or add filters to view only the records that meet your criteria. You have different options depending on the field(Picklist, Date, Currency) you want to filter on.

1. From the available columns dropdown menu, select the field to filter by.
2. Make a selection or enter a value(s) depending on the type of field
3. Repeat the same process to add extra columns, then click **Apply**

{% hint style="info" %}
You can cancel or reset the filters at any time by clicking on **Cancel** or **Reset.** For Picklist, MultiPicklist and Lookup fields, multiple entries can be selected.
{% endhint %}

### Columns

Add or remove columns to see only the columns that you are interested in.

1. From the available columns dropdown menu, select the field to display.
2. Drag & drop a column to change the order of the displayed columns
3. You can hide the column by clicking on the **delete** icon
4. Repeat the same process, then click **Apply**

{% hint style="info" %}
You can cancel or reset at any time by clicking on **Cancel** or **Reset**
{% endhint %}

### Grouping

Add or remove columns to group the records. You can group opportunities by Stages for instance.

1. From the available columns dropdown menu, select the field to group by.
2. Drag & drop a column to change the order of the grouping
3. You can remove the column by clicking on the **delete** icon
4. Repeat the same process, then click **Apply**

{% hint style="info" %}
You can cancel or reset at any time by clicking on **Cancel** or **Reset**
{% endhint %}

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

## Navigation Record Actions

In addition to Quick Actions, VisualForce Page, Call Flow and GridMate actions (Share, Assign, Approval...), LWC Navigation actions can be added as a row level action.

### View Record

```coffeescript
  {
      "name": "View",
      "label": "View",
      "navigate": {
         "type": "standard__recordPage",
         "attributes": {
            "actionName": "view"
         }
      }
   }
```

### Edit Record

```coffeescript
{
      "name": "Edit",
      "label": "Edit",
      "navigate": {
         "type": "standard__recordPage",
         "attributes": {
            "actionName": "edit"
         }
      }
   }
```

### Related List

```coffeescript
{
      "name": "Products",
      "label": "Products",     
      "navigate": {
         "type": "standard__recordRelationshipPage",
         "attributes": {
            "relationshipApiName": "${RelationshipName}",
            "actionName": "view"
         }
      }
   }
```


# Grid - Advanced Filtering

## Using Junctions

To filter the records either as an admin or as an end user can combine conditions with conjunctions like ‘OR’, ‘AND’. Below is a complex filter query:

```coffeescript
{
   "or": [
      {
         "ParentId": {
            "operator": "=",
            "value": "$recordId"
         }
      },
      {
         "UltimateParent__c": {
            "operator": "=",
            "value": "$recordId"
         }
      }
   ]
}
```

{% hint style="info" %}
$recordId can be used to implicitly use the current recordId
{% endhint %}

## Using Inline SOQL

An inline SOQL query can be used to filter records within the current record. Inline SOQL can be used with “in” operator only:

```coffeescript
{
   "Id": {
      "operator": "in",
      "value": "SELECT Project__c FROM Assignment__c WHERE Manager__c=$$recordId$"
   }
}
```

{% hint style="info" %}
$$recordId$ can be used to implicitly use the current recordId in the SOQL query
{% endhint %}

## Using Parent Field

Any field from the current object can be used to filter the related records. Parent fields can be referenced in the filter property as a merge field $record.**fieldApiName**&#x20;

```coffeescript
{
   "Country__c": {
      "operator": "=",
      "value": "$record.BillingCountry"
   }
}
```

## Using $USER

Any field from the logged user can be used to filter the related records. User fields can be referenced in the filter property as a merge field $USER.**fieldApiName**&#x20;

```coffeescript
{
   "Amount": {
      "operator": "<",
      "value": "$USER.Minimum_Amount__c"
   }
}
```

## Using $CUSTOMSETTING

Any field from any custom settings can be used to filter the related records. Custom settings fields can be referenced in the filter property as a merge field $CUSTOMSETTING.**objectApiName**.**fieldApiName**&#x20;

```coffeescript
{
   "Discount__c": {
      "operator": ">",
      "value": "$CUSTOMSETTING.Quote_Settings__c.Max_Discount__c"
   }
}
```

## Using $APEX

For complex use cases, an apex class can be provided as a value provider for a filter property as a merge field $APEX.className({params})&#x20;

```coffeescript
{
   "Id": {
      "operator": "in",
      "value": "$APEX.AttachedDocumentFilter({\"recordId\":\"$recordId\"})"
   }
}
```

{% hint style="info" %}
Apex class parameters should be always an escaped JSON string. $recordId can be used to implicitly use the current recordId.&#x20;
{% endhint %}

The value provider class should implement a Callable interface and should be global. GridMate runs the value provider dynamically:

```java
Callable handler = (Callable) Type.forName(handlerClass).newInstance();
return (String) handler.call('getValue', params);
```

The example below showcase a specific value provider to filter ContentVersion based on the current record:

{% tabs %}
{% tab title="AttachedDocumentFilter.cls" %}

```java
global with sharing class AttachedDocumentFilter implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getValue') {
            String recordId = (String) args.get('recordId');

            //Build the list of linked documents
            List<ContentDocumentLink> linkList = [
                SELECT Id, ContentDocument.LatestPublishedVersionId
                FROM ContentDocumentLink
                WHERE LinkedEntityId = :recordId
            ];

            List<Id> idList = new List<Id>();
            for (ContentDocumentLink link : linkList) {
                idList.add(link.ContentDocument.LatestPublishedVersionId);
            }

            return '(\'' + String.join(idList, '\',\'') + '\')';
        } else {
            throw new ExtensionMalformedCallException('Action not implemented');
        }
    }

    public class ExtensionMalformedCallException extends Exception {
    }
}
```

{% endtab %}

{% tab title="AttachedDocumentFilterTest.cls" %}

```java
@isTest
class AttachedDocumentFilterTest {
    @testSetup
    static void createTestData() {
        ContentVersion content = new ContentVersion(
            Title = 'Demo Script',
            PathOnClient = '/demo_script.txt',
            VersionData = Blob.valueOf('Unit Test ContentVersion Body'),
            Origin = 'H'
        );

        insert content;
    }

    static testMethod void testExecute() {
        Test.startTest();

        Callable handler = (Callable) Type.forName('AttachedDocumentFilter').newInstance();
        String values = (String) handler.call(
            'getValue',
            new Map<String, String>{ 'recordId' => UserInfo.getUserId() }
        );

        Test.stopTest();

        System.assert(values != null);
    }
}
```

{% endtab %}
{% endtabs %}

## Querying All Rows

To query all rows set the flag **gmpkg\_\_allRows** to true. The example below showcase a filter fecthing all the emails including the archived ones:

```json
{
    "and": [
        {
            "AccountId": {
                "operator": "=",
                "value": "$recordId"
            }
        },
        {
            "Subject": {
                "operator": "like",
                "value": "Email%"
            }
        },
        {
            "gmpkg__allRows": true
        }
    ]
}
```


# Grid - Inline Components

All GridMate grids (**GM - RelatedList Grid, GM - FieldSet Grid, GM - ListView Grid...**) can be configured to display inline grids. Multiple grids could be displayed under each record to show child objects in a grid way. We can have a hierarchy of grids like **Accounts** => **Opportunities** => **Opportunity Products**

## Master Grid Setup

Edit the Account Lightning page and configure the opportunities grid using the component **GM - RelatedList Grid.** With the Lightning App builder and the [configuration wizard](/advanced-guides/grid-configuration), we can configure every aspect of the grid.

![Opportunities on Account page](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MGEXALESGWJTtsAwqCY%2F-MGE_RWl4lwqg9bNPqPW%2FScreenshot%202020-09-02%20at%2018.09.27.png?alt=media\&token=d77aa74a-02d5-46ab-92fa-1208049ca26d)

## **Child Grid Setup**

Edit the Opportunity page and configure the opportunity products grid using the Lightning App Builder.

![Opportunity Products on Opportunity page](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MGEXALESGWJTtsAwqCY%2F-MGEaAzZgkXcCZQpC02x%2FScreenshot%202020-09-02%20at%2018.13.38.png?alt=media\&token=0ed05ca1-7af5-4cb0-b8c1-b0a6b7ee09f3)

## Inline Grid Setup

Copy the configuration from the child grid (Opportunity Products) and paste it to the master grid (Opportunities) in **Record Related Components** property. See the video below :point\_down:

{% embed url="<https://youtu.be/Y0BweQmKV18>" %}
Grid - Inline Components
{% endembed %}

{% hint style="info" %}
The child grid can be deleted if it's not needed on the child object once the configuration is done.
{% endhint %}

## Split View Setup

Split View feature significantly improves productivity by enabling simultaneous work on multiple tasks without the need to switch between different windows, enhancing efficiency and streamlining the work process.

#### Enable split view

Enabling the Split View feature allows you to apply the split view on your grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FlOYEj9SgxCdip09yo1dr%2FScreenshot%202023-06-14%20at%2020.50.25.png?alt=media&#x26;token=6e637b63-2c8c-4e3a-be41-a18d3c3681bb" alt=""><figcaption></figcaption></figure>

#### Split View Setup

Once you enable the Split View option, you can apply the split view on your grid. The video below is a step-by-step tutorial to learn how to use the **Split View**:point\_down:.

{% embed url="<https://youtu.be/2LIhImRvEhE>" %}
Split View
{% endembed %}

## Multi Inline Components **Setup**

The inline grid component provides the ability to configure multiple components. Here's a configuration:

```json
[
    {
        "component": "gmpkg:RecordLayoutComponent",
        "attributes": {
            "targetObjName": "Contact",
            "recordIdField": "Sponsor__c",
            "showBorder": true,
            "recordLayout": "{\"sections\":[{\"name\":\"SponsorInformation\",\"label\":\"Sponsor Information\",\"active\":true,\"cols\":3,\"rows\":[[{\"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\":\"CreatedById\",\"noWhitespace\":true}],[{\"apiName\":\"LastModifiedById\",\"noWhitespace\":true}],[{\"apiName\":\"Notes__c\",\"noWhitespace\":true}],[{\"apiName\":\"RecordTypeId\",\"noWhitespace\":true}]]}]}"
        }
    },
    {
        "component": "gmpkg:RelatedListDataGridComponent",
        "attributes": {
            "relatedListLabel": "Contact Roles",
            "rowLimit": 100,
            "pageSize": 10,
            "customIcon": "standard:contact",
            "filter": "{}",
            "order": "",
            "canUpdate": true,
            "canMassUpdate": true,
            "canDelete": true,
            "canCreate": true,
            "showBorder": true,
            "showColumnBorder": true,
            "recordDetail": true,
            "canFilter": true,
            "canClone": true,
            "canExport": true,
            "canImport": false,
            "canFreeze": true,
            "canExplore": false,
            "fullRecordCreation": true,
            "defaultValues": "{}",
            "jsonActions": "[]",
            "buttonActions": false,
            "visibleActions": 0,
            "jsonRecordActions": "[]",
            "frozenColumns": 0,
            "TotalColor": "#FFFFFF",
            "TotalBgColor": "#0176D2",
            "recordRelated": "[]",
            "density": "comfy"
        }
    },
    {
        "component": "gmpkg:RelatedListDataGridComponent",
        "attributes": {
            "relatedListLabel": "Opportunity Team",
            "rowLimit": 100,
            "pageSize": 10,
            "customIcon": "standard:contact",
            "filter": "{}",
            "order": "",
            "canUpdate": true,
            "canMassUpdate": true,
            "canDelete": true,
            "canCreate": true,
            "canFilter": true,
            "canClone": true,
            "canExport": true,
            "canImport": false,
            "canFreeze": true,
            "canExplore": false,
            "fullRecordCreation": true,
            "showBorder": true,
            "showColumnBorder": true,
            "recordDetail": true,
            "defaultValues": "{}",
            "jsonActions": "[]",
            "buttonActions": false,
            "visibleActions": 0,
            "jsonRecordActions": "[]",
            "frozenColumns": 0,
            "TotalColor": "#FFFFFF",
            "TotalBgColor": "#0176D2",
            "recordRelated": "[]",
            "density": "comfy"
        }
    },
    {
        "component": "gmpkg:RelatedListDataGridComponent",
        "attributes": {
            "relatedListLabel": "Products",
            "rowLimit": 100,
            "pageSize": 10,
            "customIcon": "standard:contact",
            "filter": "{}",
            "order": "",
            "canUpdate": true,
            "canMassUpdate": true,
            "canDelete": true,
            "canCreate": true,
            "canFilter": true,
            "canClone": true,
            "canExport": true,
            "canImport": false,
            "canFreeze": true,
            "canExplore": false,
            "fullRecordCreation": true,
            "defaultValues": "{}",
            "jsonActions": "[]",
            "buttonActions": false,
            "visibleActions": 0,
            "showBorder": true,
            "showColumnBorder": true,
            "recordDetail": true,
            "jsonRecordActions": "[]",
            "frozenColumns": 0,
            "TotalColor": "#FFFFFF",
            "TotalBgColor": "#0176D2",
            "recordRelated": "[]",
            "density": "comfy"
        }
    }
]
```

## Configuration

Inline components are read from the **Record Related Components** property of the grid; **Extra Record Related Components** is appended to it for large configurations. Supported grids: GM - RelatedList Grid, FieldSet Grid, ListView Grid, Parent RelatedList Grid, Dynamic FieldSet Grid, ListView Kanban, FieldSet Kanban, Flow View Grid, RelatedList Cards, Accordion and Tabs. For GM - User Grid, the list is built from **Config. Wiz → Inline Components** and laid out as Stacked, Accordion or Tabs.

Each entry is a component name and its App Builder attributes:

```json
[
    {
        "component": "gmpkg:RecordPageLayoutComponent",
        "attributes": {
            "sObjectName": "Contact"
        }
    }
]
```

* `component` — any GridMate component, a standard component (`forceChatter:feed`) or your own exposed Aura/LWC component (see [Grid - Custom Inline Component](/advanced-guides/grid-custom-inline-component)).
* `attributes` — the component properties, named as in the App Builder. `recordId`, `sObjectName` and `inline` are set by the grid from the current row. `$recordId` in any attribute is replaced by the row Id; `"recordId": "$AccountId"` targets a lookup of the row instead.

The **Inline Config** toolbar action of a grid or a Record Layout copies its current configuration as a ready-to-paste entry. More samples: [Config Snippets](/troubleshooting/config-samples).


# Grid - Mass Edit Button

As a Salesforce admin, you can configure a Mass Edit button.  GridMate provides a component to convert any list view to [GM - ListView Grid](/package-reference/components-library/gm-listview-grid) on the fly. In the steps below we will configure such action on the **Account** object.

## Mass Edit Button Setup

To trigger the Mass Edit, we have to configure a link on the Account object. The display type should be List Button without checkboxes.&#x20;

![Mass edit configuration](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MGKJZ2sfzGc7cChRSRq%2F-MGKOwlp6FOOVkkxzeJI%2FScreenshot%202020-09-03%20at%2021.18.01.png?alt=media\&token=eb6f0a91-aa6f-4901-baab-95428aa54f8e)

```http
/lightning/cmp/gmpkg__MassEditListViewComponent?c__object=Account&c__attributes=%7B%22canCreate%22%3A+false%2C%22canClone%22%3A+false%7D
```

{% hint style="info" %}
Mass Edit can be enabled on any object by duplicating the link below and changing the **c\_\_object** parameter and **c\_attributes** if necessary.&#x20;

**c\_\_attributes** is an HTML encoded JSON to control the behavior of the grid. All the attributes are described [here](/package-reference/components-library/gm-listview-grid).

To encode a JSON, you can use your own tool or an online [website](https://www.url-encode-decode.com/).&#x20;
{% endhint %}

## List View Actions Setup

The link should be added to the list of actions on a ListView. All the steps are described :point\_right: [here](https://help.salesforce.com/articleView?id=mass_quick_actions_create.htm\&type=5)**.**

![List view actions setup](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MGKJZ2sfzGc7cChRSRq%2F-MGKRbs3dBAYTc7dHi-4%2FScreenshot%202020-09-03%20at%2021.29.48.png?alt=media\&token=e67d139d-7e37-440b-853e-c0f2f2a8fa2d)

## **Mass Edit In Action**

{% embed url="<https://youtu.be/JTKozLJ4d6M>" %}
Grid - Mass Edit
{% endembed %}


# Grid - Grid Explorer

GridMate's Grid Explorer simplifies data analysis and database management by enabling users to efficiently manipulate and organize large volumes of data. This powerful tool helps users work more efficiently with data, leading to better insights and outcomes. By saving time and effort while also improving analysis accuracy.

## Enable Grid Explorer

The Enable explorer feature allows you to add the Grid Explorer action to your Grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F8tQTYwefT77kjT1DNh2t%2FScreenshot%202023-04-26%20at%2021.10.17.png?alt=media&amp;token=4396de9a-6a56-4ecd-ba8a-c919c0ce73f7" alt=""><figcaption><p>Enable explorer</p></figcaption></figure>

## Filter  Property

To configure the **Filter** property.

1. Launch the Grid Explorer and select the **Filter** tab.
2. Step 1 - Select the filter fields by choosing from the available list the fields to be added, such as Stage.
3. Step 2 - Define filter values by selecting from the presented options, such as '**Closed won**'.
4. Step 3 - Apply the Filter Configuration.

{% embed url="<https://youtu.be/XcbzAOj1Igw>" %}
Grid Explorer - Filter
{% endembed %}

## Columns  Property

To configure the **Columns** property.

1. Launch the Grid Explorer and select the **Columns** tab.
2. Step 1 - Add/Remove the columns
3. Step 2 - Drag and drop the columns into the desired order.
4. Step 3 - Apply the Columns Configuration

{% embed url="<https://youtu.be/Xrq0I-6rMMQ>" %}
Grid Explorer - Columns
{% endembed %}

## Sort/Order  Property

To configure the **Sort/Order** properties.

1. Launch the Grid Explorer and select the **Sort/Order** tab.
2. Step 1 - Select the fields from the list of available sort options to sort your data.
3. Step 2 - Use the dropdown arrow on the right to choose between ascending and descending order.
4. Step 3 - Drag and drop the columns into the desired order.
5. Step 4 - Apply the Sort Configuration&#x20;

{% embed url="<https://youtu.be/t_Y19DgK9ps>" %}
Grid Explorer - Sort/Order
{% endembed %}

## Group By Property

To configure the **Group By** properties.

1. Launch the Grid Explorer and select the **Group By** tab.
2. Step 1 - Select the Grouping Fields by choosing the appropriate fields from the Available list that will be used to group the data, such as **Stage**.&#x20;
3. Step 2 - Drag and drop the columns into the desired order.
4. Step 3 - **Grouping** Configuration&#x20;

{% embed url="<https://youtu.be/NZ3lXJTIyhE>" %}
Grid Explorer - Group By
{% endembed %}

## Templates Property

#### Enable Grid Explorer Template

Enabling Preference Template allows you to save Grid Explorer configurations as templates.

<figure><img src="https://lh5.googleusercontent.com/rXsKVR48v5H82cDuo0siWldGRtR9-W0482S_AX_dTgMouipSPyq0J9vq7LMMcl0_J_ihEEosx6vg9-xKOOM-24XcH4F8ieN4N4EAVf6DnMysqUanNTgxuDw_CWsgdCPGT5hRvPrUp34sozLVIa6Q4Gs" alt=""><figcaption></figcaption></figure>

<figure><img src="https://lh4.googleusercontent.com/2W_fwq6PYaqAAyFppMOZXXDJSLIzgutucLom08QoruoNb8aLiVt2rWQI8FPyZfOnkcYnBjET0aFpbKGHQZ1-fRmoc1JtLXhUqSCC8_uyXwSc0htLVeNMTChJ9mIicGb_HqSxTmePXiGX0Nf1c_Sy1Gs" alt=""><figcaption></figcaption></figure>

#### Templates Setup

To save **Grid Explorer** configuration as **Template**.

1. Launch the Grid Explorer and select the **Templates** tab.
2. Set up your configuration including filters, columns, sorting and grouping
3. Give a title and a summary for example to guide your users
4. Save your template. Once saved, the template is available to be applicable
5. Any user can apply the whole template or select a subset of properties.

{% embed url="<https://youtu.be/Xxv5IeQGtF0>" %}
Grid Explorer -Templates
{% endembed %}


# Grid - Enhanced Filter Builder

As a Salesforce admin, you have the ability to use the **Enhanced Filter Builder** to create complex filters that meet your specific criteria. Unlike standard filters, the **Enhanced Filter Builder** provides more advanced filtering options, allowing you to combine **AND**, **OR** conditions to create custom filters. This powerful feature can help you filter your data more effectively and make more informed decisions based on your specific needs.

{% hint style="info" %}
When Enhanced Filter is enabled, the builder is activated for Admin in the configuration wizard (Filters, Coloring) and for end users to create their own filters.
{% endhint %}

## Enable **Enhanced Filter Builder**&#x20;

To enable the **Enhanced Filter Builder**, start by navigating to Setup. Then, search for Custom Settings and click on Manage next to the DataGrid setting. Check the box for the Enhanced Filter Builder and click Save to activate it. Once you've completed these steps, you'll be able to use the Enhanced Filter Builder to create your filters.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FOovGu3zJd9tmuiBLQSfU%2FScreenshot%202023-03-21%20at%2016.03.18.png?alt=media&amp;token=8899c857-ea8a-4310-98f4-72cf9e40e0c6" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FMXmmkBv0P7EgoVJIdUJM%2FScreenshot%202023-03-21%20at%2016.02.53.png?alt=media&amp;token=59e19c7b-fe99-45e8-895c-7de6b0d7b55b" alt=""><figcaption></figcaption></figure>

## **Enhanced Filter Builder** Setup

Once the Enhanced Filter Builder is enabled, you can start creating more complex filters. The  video below is a step-by-step tutorial to learn how to use the Enhanced Filter Builder👇

{% embed url="<https://youtu.be/VNXF5yFnu1g>" %}
Grid - Enhanced Filter Builder
{% endembed %}


# Grid - Data Import Wizard

The Data Import Wizard is a feature available to GridMate users that simplifies the process of importing data from external sources into their Salesforce org. With step-by-step guidance, real-time updates, and error messages, it reduces the risk of errors and saves time compared to manual data entry.

## Enable Import Object

The **Enable Import object** feature allows you to add the Data Import Wizard action to your Grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F8ip5L5PAWsBStjyUMKBV%2FGrid%20-%20Data%20import%20Wizard.png?alt=media&amp;token=28e07086-2f52-47ed-9db3-ed54889adb07" alt=""><figcaption><p><strong>Enable Import object</strong></p></figcaption></figure>

## Data Import Monitor

The Import Monitor is a GridMate utility bar that enables you to monitor the status of imports and detect any errors that may occur during the process.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FKv6KG8QiyCB6ApkJ26JL%2FScreenshot%202023-03-21%20at%2023.49.39.png?alt=media&amp;token=8481e268-5f01-4393-babe-9bcb0b109815" alt=""><figcaption></figcaption></figure>

## Data Import Wizard Setup

By enabling import objects and adding the Import Monitor, you can now easily import your data using the GridMate Import Wizard from any **GM - Smart Grid(Related List, FieldSet, ListView and User Grid)**. The video below is a step-by-step tutorial to get familiar with import wizard👇.

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


# Grid - Dynamic Formula Field

Empower your Salesforce users with GridMate's **Dynamic Formula** fields that reference other fields and get updated automatically as the user updates the grid. This type of fields is a powerful feature for calculating values and displaying information in real-time.

## Enable Create Formula

To enable the **Create Formula** option, edit the Lightning page in the App Builder, select the Grid and check **"Enable Create Formula"**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FkTVYxh6tWeoNwaPGPHsp%2FGrid%20-%20Dynamic%20Formula%20Field.png?alt=media&#x26;token=67c112fb-9162-4e04-9950-d910a69d3a5d" alt=""><figcaption></figcaption></figure>

## Dynamic Formula Field Setup

Once you have enabled the **Create Formula** option, you can start creating formula fields as an **End User**. The video below is a step-by-step tutorial to learn how to use the **Dynamic Formula Field**:point\_down:.

{% embed url="<https://youtu.be/kfNMNtb8amw>" %}
Grid - Dynamic Formula Fields
{% endembed %}

{% hint style="info" %}
A formula field has a **Type** (Text, Checkbox, Date, Number, Currency, Percent, Url, RichText, File Upload, Custom) and a formula. The type drives how the result is displayed. Formula columns can also be defined by the administrator from the **Formulas** tab of the **Config. Wiz**. See [Javascript Formulas](/package-reference/javascript-formulas) for the list of operators and functions.
{% endhint %}

## Apex Formula

A basic formula combines the fields of the row with operators and functions. The value is calculated on the browser side and refreshed automatically when the user edits the row.

When the value cannot be calculated from the fields of the row (aggregations, related records, external systems...), the `APEX()` function delegates the calculation to an Apex class:

```javascript
APEX(handler, param1, value1, ...)
```

* `handler` is the name of the Apex class.
* The next arguments are name/value pairs. The values can be fields of the row or expressions.

### Apex Class

The Apex class should be **global** and should implement the **Callable** interface. GridMate runs the class for each row with the `getValue` action and the name/value pairs as parameters:

```apex
Callable handler = (Callable) Type.forName(handlerClass).newInstance();
return handler.call('getValue', params);
```

Our use case is to flag the won opportunities on an Opportunity User Grid. Let's create the Apex class **WonOpportunities** which receives the record Id and returns a boolean.

{% tabs %}
{% tab title="WonOpportunities.cls" %}

```apex
global class WonOpportunities implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getValue') {
            String recordId = (String) args.get('recordId');

            List<Opportunity> opp = [
                SELECT Id, StageName
                FROM Opportunity
                WHERE Id = :recordId
            ];

            return opp.size() > 0 && opp[0]?.StageName == 'Closed Won' ? true : false;
        } else {
            throw new ExtensionMalformedCallException('Action not implemented');
        }
    }

    public class ExtensionMalformedCallException extends Exception {
    }
}
```

{% endtab %}
{% endtabs %}

### Formula Configuration

Our Apex class is ready. Let's go ahead and create the formula on the Opportunity User Grid:

1. Open the **Grid Explorer**, go to the **Columns** tab and select **--Create New--**.
2. Set the **Type** to **Checkbox** and the label to **Won Opportunities**.
3. Set the formula as below, click **Check Syntax** then **Save**.

```javascript
APEX("WonOpportunities", "recordId", Id)
```

4. Add the new **Won Opportunities** column to the grid and click **Apply**.

The returned value is displayed according to the **Type** of the formula: a checkbox in our example, a formatted number for Number/Currency/Percent, a formatted date for Date... When the type is **Text**, the returned value is rendered as rich text, so the Apex class can return HTML like a link or a badge.

{% hint style="info" %}

* The Apex class is called once per row when the rows are loaded. A cell displays a working indicator until the value is returned.
* Apex formula values are not recalculated when the user edits the row and are read only.
* Apex formula columns are not included in the scheduled exports.
  {% endhint %}

### Bulk Mode

By default, the Apex class is called for each row. When the grid displays many rows, set the `batchSize` parameter to call the Apex class once per batch of rows:

```javascript
APEX("WonOpportunities", "batchSize", 200, "recordId", Id)
```

In bulk mode, GridMate calls the `getValues` action with a single `params` parameter: the JSON list of the name/value pairs of each row. The class should return the list of values **in the same order**.

```apex
global class WonOpportunities implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getValues') {
            List<Object> rows = (List<Object>) JSON.deserializeUntyped((String) args.get('params'));

            Set<Id> oppIds = new Set<Id>();
            for (Object row : rows) {
                oppIds.add((String) ((Map<String, Object>) row).get('recordId'));
            }

            Map<Id, Opportunity> oppMap = new Map<Id, Opportunity>(
                [SELECT Id, StageName FROM Opportunity WHERE Id IN :oppIds]
            );

            List<Object> values = new List<Object>();
            for (Object row : rows) {
                Id oppId = (String) ((Map<String, Object>) row).get('recordId');
                values.add(oppMap.containsKey(oppId) && oppMap.get(oppId).StageName == 'Closed Won');
            }

            return values;
        } else {
            throw new ExtensionMalformedCallException('Action not implemented');
        }
    }

    public class ExtensionMalformedCallException extends Exception {
    }
}
```


# Grid - Dynamic Interaction

**GridMate - Dynamic Interaction** feature enhances usability by allowing users to access or view related data without navigating away from the current context. It provides a seamless way to explore associated records or details without the need for switching between different screens or pages. Additionally, it reduces the need for multiple clicks or page reloads, streamlining the user experience and improving productivity.

## **Enable Dynamic interaction** &#x20;

Enable Dynamic Interaction option allows the component to publish events that can be leveraged by the Lightning App Builder to create more [interactive UI](https://help.salesforce.com/s/articleView?id=sf.dynamic_interactions_overview.htm\&type=5). With this feature GridMate can be integrated with Lightning Component.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FXVeBYqgW30ms8426lBZ7%2FScreenshot%202023-06-08%20at%2023.48.31.png?alt=media&amp;token=a0fbe5c9-fd6f-456f-a2af-4018dd6d7289" alt=""><figcaption><p>Enable Dynamic interaction</p></figcaption></figure>

\
**Dynamic interaction** Setup
-----------------------------

Once you enable the **Dynamic Interaction** option, you can begin creating dynamic interactions. The video below is a step-by-step tutorial to learn how to use the **Dynamic Interaction**:point\_down:.

{% embed url="<https://youtu.be/vCjp4i5RVqc>" %}
Dynamic Interaction
{% endembed %}


# Grid - Dynamic FieldSet Grid

**GM - Dynamic FieldSet Grid** enhances usability by enabling users to access or view related data within the current context, eliminating the need for navigation. It offers a seamless way to explore associated records or details without switching between screens or pages, reducing the requirement for multiple clicks or page reloads. This streamlines the user experience, boosting productivity.

## Enable dynamic interaction

Enable Dynamic Interaction option allows the component to publish events that can be leveraged by **GM - Dynamic FieldSet Grid**. This component is useful to create dynamic interaction experience on a record page or even on experience cloud.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FV3hulYQs1VOlcyQtXwLe%2FScreenshot%202023-07-14%20at%2015.03.43.png?alt=media&amp;token=faf42fa7-b3b3-4eba-9356-759178f02577" alt=""><figcaption></figcaption></figure>

## GM - Dynamic FieldSet Grid Setup

Once you enable the **Dynamic Interaction** option, you can begin creating dynamic interactions. The video below is a step-by-step tutorial to learn how to use the **GM - Dynamic FieldSet Grid**:point\_down:.

{% embed url="<https://youtu.be/GXSNWbwweUY>" %}
Dynamic FieldSet Grid
{% endembed %}

{% hint style="info" %}
**GM - Dynamic FieldSet Grid** has the same properties as **GM - FieldSet Grid**. The component should be tied to a parent grid to get refreshed when the user clicks on a specific row. To make the link to a parent grid, the properties below should be defined:

* **Parent Object Name** : The parent object name to listen on,
* **Parent Grid Name :** The parent grid name to listen on. It could the related list label (**GM - RelatedList Grid**), the field set name (**GM - FieldSet Grid**) or the list view api name (**GM - ListView Grid**).
* **Parent Grid Code :** The data grid code to listen on.
  {% endhint %}

{% hint style="info" %}
If you are looking for a relationship created by a lookup or master-detail field:

* Go to Setup > Object Manager.
* Select the Child Object (the object that points to the parent).
* Go to Fields & Relationships and open the specific Lookup/Master-Detail field that links to the parent.
* Look for the field labeled Child Relationship Name. This is the value you need.
* Again, if it is a custom relationship, append `__r` to this value (e.g., if the name is `My_Custom_Items`, the relationship name in SOQL is `My_Custom_Items__r`).
  {% endhint %}


# Grid - Dynamic Record Card

**GM - Dynamic Record Card** component dynamically displays record details related when the user click on a specific row from a master grid (GM - RelatedList, GM - ListView, or GM - FieldSet Grid).&#x20;

The master component should have **Enable Dynamic Interaction** option checked to notify **GM - Dynamic Record Card**. See [Enable dynamic interaction](/advanced-guides/grid-dynamic-interaction#enable-dynamic-interaction).

This tutorial will guide you through configuring the **Dynamic Record Card** component to showcase the **Name**, **Website**, and **BillingCountry** within a card format from an Account ListView grid.

1. Edit the page in the Lightning App Builder.
2. From components list, drag and drop the component **GM - Dynamic record Card**.
3. The component is now ready for configuration in the Lightning App Builder.
4. To perform a quick configuration, populate the properties below:&#x20;
   * Card Icon : **standard:account**.
   * Show Border : **Checked**.
   * Object Name : **Account.**
   * Record Id Field : **Id.**
   * Parent Object Name : **Account.**
   * Parent Grid Name  : **Account\_SDR\_FieldSet.**
   * Parent Grid Code  : **Account\_SDR\_FieldSet.**
   * Record Fields : **\["Name","Website","BillingCountry"]**.
   * Show Record Details : **Checked.**

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

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

{% hint style="info" %}
**GM - Dynamic Record Card** has the same properties as **GM - Record Card**. The component should be tied to a parent grid to get refreshed when the user clicks on a specific row. To make the link to a parent grid, the properties below should be defined:

* **Parent Object Name** : The parent object name to listen on,
* **Parent Grid Name :** The parent grid name to listen on.
* **Parent Grid Code :** The data grid code to listen on.
  {% endhint %}


# Grid - Custom Action

## Introduction

GridMate offers out of the box a set of actions like Mass Assign, Mass Approve...However there is some situation where a custom component is required to address the business needs like implementing a specific logic or calling an external system.&#x20;

To address this type of use cases, GridMate defines an interface which is a set of properties and events.&#x20;

### **Aura Properties**

```html
<!-- The object of the grid -->
<aura:attribute name="relatedObjectName" type="String" access="global" />
<!-- The list of displayed columns -->
<aura:attribute name="columns" type="Object[]" access="global" />
<!-- The list of selected items -->
<aura:attribute name="selectedItems" type="Object[]" access="global" />
<!-- The Id of the master record (record page or master record) -->
<aura:attribute name="recordId" type="String" access="global" />
```

### **Aura Events**

```html
<!-- Event to be fired when the action is executed successfully-->
<aura:registerEvent name="onsuccess" type="c:DataGridActionEvent" />
<!-- Event to be fired when the user cancel the action-->
<aura:registerEvent name="oncancel" type="c:DataGridActionEvent" />
```

## Aura Implementation

### Aura Component

Let's say that we want to move to close date by one day for the selected items. Let's go ahead and start our custom action using an Aura component.

This action will be triggered from an Opportunity grid. Let's create an Aura component **MoveCloseDateComponent.** The component has all the required properties described above.

Also the component will fire **onsucess** or **oncancel** based on the user flow when the user submit the transaction or cancel the screen.

{% tabs %}
{% tab title="MoveCloseDateComponent.cmp" %}

```html
<aura:component implements="force:hasRecordId" controller="MoveCloseDateController" access="global">
    <!-- Aura Props -->
    <aura:attribute name="relatedObjectName" type="String" access="global" />
    <aura:attribute name="columns" type="Object[]" access="global" />
    <aura:attribute name="selectedItems" type="Object[]" access="global" />

    <!-- Aura Events -->
    <aura:registerEvent name="onsuccess" type="gmpkg:DataGridActionEvent" />
    <aura:registerEvent name="oncancel" type="gmpkg:DataGridActionEvent" />

    <!-- Internal flag to control the spinner-->
    <aura:attribute name="isWorking" type="Boolean" access="global" />

    <!-- overlayLib API -->
    <lightning:overlayLibrary aura:id="overlayLib" />

    <div class="slds-theme_default">
        <div class="content-wrapper">
            <lightning:input type="date" name="closeDate" label="Close Date" />
        </div>

        <div class="slds-modal__footer actions-wrapper">
            <button class="slds-button slds-button--neutral" onclick="{!c.handleCancel}">Cancel</button>
            <button class="slds-button slds-button--brand" onclick="{!c.handleSubmit}">Submit</button>
        </div>

        <aura:if isTrue="{! v.isWorking }">
            <lightning:spinner variant="brand" alternativeText="Processing" style="background: transparent" />
        </aura:if>
    </div>
</aura:component>
```

{% endtab %}

{% tab title="MoveCloseDateComponentController.js" %}

```javascript
({
    handleSubmit: function (component, event, helper) {
        component.set('v.isWorking', true);

        //Submit the action to the Salesforce
        let action = component.get('c.moveCloseDate');
        action.setParams({
            idList: component.get('v.selectedItems').map((x) => x.Id),
            closeDate: component.get('v.closeDate')
        });

        action.setCallback(this, function (res) {
            component.set('v.isWorking', false);

            if (res.getState() === 'SUCCESS') {
                //Show a toast for the end user
                let toastEvent = $A.get('e.force:showToast');

                toastEvent
                    .setParams({
                        title: 'Success',
                        type: 'success',
                        message: 'Action Executed Successfully'
                    })
                    .fire();

                component
                    .getEvent('onsuccess')
                    .setParams({
                        action: 'ActionExecuted'
                    })
                    .fire();

                //Close the modal
                component.find('overlayLib').notifyClose();
            } else if (res.getState() === 'ERROR') {
                console.log(res.getError());
            }
        });

        $A.enqueueAction(action);
    },
    handleCancel: function (component, event, helper) {
        component
            .getEvent('oncancel')
            .setParams({
                action: 'ActionCancelled'
            })
            .fire();

        component.find('overlayLib').notifyClose();
    }
});
```

{% endtab %}
{% endtabs %}

### Apex Controller

The Aura component is ready, let's go ahead and implement the Apex controller. In our example, the job of the controller is straightforward; update the close date of the selected record&#x73;**.**&#x20;

{% tabs %}
{% tab title="MoveCloseDateController" %}

```apex
public with sharing class MoveCloseDateController {
    @AuraEnabled
    public static boolean moveCloseDate(List<Id> idList, Date closeDate) {
        List<Opportunity> oppList = new List<Opportunity>();
        for (Id oppId : idList) {
            oppList.add(new Opportunity(Id = oppId, CloseDate = closeDate));
        }

        update oppList;
        return true;
    }
}
```

{% endtab %}
{% endtabs %}

### Action Configuration

Our Aura component and the Apex class are ready for use. Let's go ahead and configure the grid action as below:

```json
[
    {
        "name": "Move",
        "label": "Move",
        "component": "c:MoveCloseDateComponent"
    }
]
```

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FgInzy4QD4FPMCfMJF1FA%2FScreenshot%202023-11-25%20at%2001.26.36.png?alt=media&amp;token=d8e1984f-4c53-4bbd-a86d-66f276a0da11" alt=""><figcaption></figcaption></figure>

## LWC Implementation

### LWC Component

LWC is also an option to implement a custom action. GridMate provides an Aura wrapper component to launch any LWC component. Below is the LWC component to update the close date same as the aura component above.

{% tabs %}
{% tab title="moveCloseDateLWC.html" %}

```html
<template>
    <div class="slds-theme_default">
        <div class="content-wrapper">
            <lightning-input
                data-id="closeDate"
                type="date"
                label="Close Date"
            ></lightning-input>
        </div>

        <div class="slds-modal__footer actions-wrapper">
            <button
                class="slds-button slds-button--neutral"
                onclick={handleCancel}
            >
                Cancel
            </button>
            <button
                class="slds-button slds-button--brand"
                onclick={handleSubmit}
            >
                Submit
            </button>
        </div>
        <lightning-spinner
            if:true={isWorking}
            variant="brand"
            alternative-text="Processing"
            style="background: transparent"
        >
        </lightning-spinner>
    </div>
</template>

```

{% endtab %}

{% tab title="moveCloseDateLWC.js" %}

```javascript
/* eslint-disable no-unused-vars */
import { LightningElement, api, track } from 'lwc';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';

import moveCloseDate from '@salesforce/apex/MoveCloseDateController.moveCloseDate';

export default class MoveCloseDateLWC extends LightningElement {
    //api properties
    @api recordId;
    @api relatedObjectName;
    @api columns;
    @api selectedItems;

    @track isWorking;

    get closeDate() {
        return this.template.querySelector('[data-id="closeDate"]');
    }

    handleSubmit(event) {
        this.isWorking = true;

        moveCloseDate({
            idList: this.selectedItems.map((x) => x.Id),
            closeDate: this.closeDate.value
        })
            .then((result) => {
                this.isWorking = false;
                //Show a toast for the end user
                const toastEvent = new ShowToastEvent({
                    title: 'Success',
                    message: 'Action executed successfully!',
                    variant: 'success'
                });
                this.dispatchEvent(toastEvent);

                //Notify the Aura Wrapper
                const submitEvent = new CustomEvent('actionexecuted', {
                    detail: {
                        status: 'success',
                        action: 'moveCloseDateExecuted'
                    }
                });

                this.dispatchEvent(submitEvent);
            })
            .catch((error) => {
                this.isWorking = false;
                console.log(error);
            });
    }

    handleCancel(event) {
        const cancelEvent = new CustomEvent('cancel', {
            detail: {
                action: 'moveCloseDateCanceled'
            }
        });

        this.dispatchEvent(cancelEvent);
    }
}

```

{% endtab %}
{% endtabs %}

### Action Configuration

The LWC component is using the same Apex class. Let's go ahead and configure the grid action as below:

```json
[
     {
        "name": "MoveLWC",
        "label": "Move LWC",
        "component": "gmpkg:DataGridCallLWCComponent",
        "attributes": {
            "componentDefs": [
                {
                    "component": "c:moveCloseDateLWC",
                    "attributes": {}
                }
            ]
        }
    }
]
```

And obviously we get the same result as a above.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FNVA1bzNqwbEHOLJ0YXxi%2FScreenshot%202023-11-25%20at%2002.14.24.png?alt=media&amp;token=4e3b182f-4cba-4020-8c1b-2c9a14c2bf2d" alt=""><figcaption></figcaption></figure>


# Grid - Interactive Filters

**GridMate - Interactive Filters**, a feature provided by GridMate, offer users an authentic spreadsheet-like experience within the Salesforce platform. These advanced filters not only facilitate time savings but also enhance usability, allowing for more efficient data filtering. When this option is enabled, the user will be able to filter by a set of values or by condition like on a spreadsheet.

{% hint style="warning" %}
To build the list of values for each column, we load up to 5000 records behind the scene.
{% endhint %}

## Enable Interactive Filters

To enable **Interactive Filters** for smart grids (GM - RelatedList Grid, GM - FieldSet Grid, GM - ListView Grid), edit the Lightning page in the App Builder, select the Grid and check "Enable Interactive Filters.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FV7xkNANQoTyaRYI1ju2X%2FScreenshot%202023-07-17%20at%2012.45.22.png?alt=media&#x26;token=403d2dd2-fae4-498e-9f4b-d2bf86d3b63d" alt=""><figcaption></figcaption></figure>

To enable **Interactive Filters** for User Grids, enable the feature at the Org level though the **DataGrid Settings.**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fw6eSxTK9hAI01ajenTkT%2FScreenshot%202024-05-10%20at%2014.55.32.png?alt=media&#x26;token=30f1848a-2614-48ae-8d9b-c4bdda81df37" alt=""><figcaption></figcaption></figure>

Even if the **Interactive Filters** are not enabled at the Org level, the option can be enabled at the Grid level from **Advanced** tab.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FqLjtOBCr0eE4oWZD752F%2FScreenshot%202024-05-10%20at%2015.04.26.png?alt=media&#x26;token=49a9b7f9-be36-404f-bae3-4b43b74f6e4c" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The setup, on the Grid level, allows the Grid Owner to override the behavior (Enable/Disable).
{% endhint %}

## Pagination

**Enable Pagination** and **Enable Interactive Filters** can be used together. When both are on, the header shows the range and count of the filtered records, and **Previous** / **Next** page through them. With pagination off, the grid keeps its infinite scroll.

This applies to **GM - FieldSet Grid**, **GM - RelatedList Grid**, **GM - ListView Grid** and **User Grids**. For User Grids, enable both options in the [DataGrid Settings](/package-reference/grids-settings) or per grid from the **Advanced** tab.

{% hint style="info" %}
Interactive filters work on the records loaded in memory (up to 5,000), so the record count reflects the filtered records within that set.
{% endhint %}

## Grid - Interactive Filters Setup

Once you have enabled the **Interactive Filters** option, you can start creating filters. The video below is a step-by-step tutorial to learn how to use the **Interactive Filters** on a **GM - ListView Grid**👇.

{% embed url="<https://youtu.be/i2WpHpqJfe4>" %}
Interactive Filters
{% endembed %}


# Grid - Bulk Action

When it comes to updating the data from a grid, we might hit the limits like a CPU time, memory, DML.... To bypass those limitations, the updates should be executed in asynchronous mode using queueables or batches jobs.&#x20;

To support this type of transactions, we provide **GM - Bulk Action.** With **Bulk Action** you get a framework to track the running tasks from a developer perspective. We also provide a monitor to visualise background tasks and let the users see the outcomes including the occurred errors.

## Bulk Action Monitor Setup

To track the running bulk actions, the **GM - Bulk Action Monitor** should be configured on the Lightning App. Each app requiring this type of tracking should have this utility bar configured.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fr3fn8xXLCSPOjmPbboPJ%2FScreenshot%202023-07-11%20at%2001.12.10.png?alt=media&amp;token=73a044aa-a954-427c-90ae-2ea822414381" alt=""><figcaption><p>Action Monitor Setup #1</p></figcaption></figure>

When the utility item is added, it should be configured as below. The width and the height should adjusted based on the label of actions, screen resolution...

{% hint style="info" %}
**Start automatically** should be always checked for the monitor. If not we may loose initiated jobs before opening the monitor at the first time.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Ffa86M7gjB8ItABpYjVE2%2FScreenshot%202023-07-11%20at%2001.13.41.png?alt=media&amp;token=c9ac0317-b7aa-4aec-8922-0841563ba954" alt=""><figcaption><p>Action Monitor Setup #2</p></figcaption></figure>

The cleanup delay defines the number of second before removing a successfully completed job. If you want your users to get a chance, put a long delay.&#x20;

{% hint style="success" %}
When a job is completed, the user get success toast message if the job is completed without any error. Otherwise he will get an error notification.
{% endhint %}

## Bulk Action Implementation

### Aura Action Component

Our monitor is configured, let's go ahead and start our first bulk action. Let's say that we want to move to close date by one day for the whole scope defined by the user.&#x20;

This action will be triggered from an Opportunity grid. Let's create an Aura component **TestBulkActionActionComponent.** The component has all the required properties including:

* Grid Name : Grid name coming from the configuration,
* Grid Label : Grid label coming from the configuration,
* Action Name : Action name coming from the configuration,
* Action Label : Action label coming from the configuration,
* Query : The SOQL query defining the scope

The component should also fire **onsucess** or **oncancel** based on the user flow. Finally we will use **bulkActionPublisherLWC** utility component to publish the job to the monitor. It's a useful component to streamline the implementation process.

{% tabs %}
{% tab title="TestBulkActionActionComponent.cmp" %}

```html
<aura:component implements="force:hasRecordId" controller="TestBulkActionController" access="global">
    <!-- Action properties coming from GridMate-->
    <aura:attribute name="relatedObjectName" type="String" access="global" />    
    <aura:attribute name="gridLabel" type="String" access="global" />
    <aura:attribute name="gridName" type="String" access="global" />
    <aura:attribute name="gridCode" type="String" access="global" />
    <aura:attribute name="actionName" type="String" access="global" />
    <aura:attribute name="actionLabel" type="String" access="global" />

    <!-- Soql Query coming from GridMate-->
    <aura:attribute name="query" type="String" access="global" />

    <!-- Internal flag to control the spinner-->
    <aura:attribute name="isWorking" type="Boolean" access="global" />

    <aura:registerEvent name="onsuccess" type="gmpkg:DataGridActionEvent" />
    <aura:registerEvent name="oncancel" type="gmpkg:DataGridActionEvent" />

    <!-- overlayLib API -->
    <lightning:overlayLibrary aura:id="overlayLib" />
        
    <!-- Bulk Action Publisher -->
    <gmpkg:bulkActionPublisherLWC aura:id="bulkActionPublisher" />
    
    <div class="slds-theme_default">
        <div class="content-wrapper">
            <span> {! v.query }</span>
        </div>

        <div class="slds-modal__footer actions-wrapper">
            <button class="slds-button slds-button--neutral" onclick="{!c.handleCancel}">Cancel</button>
            <button class="slds-button slds-button--brand" onclick="{!c.handleSubmit}">Submit</button>
        </div>

        <aura:if isTrue="{! v.isWorking }">
            <lightning:spinner variant="brand" alternativeText="Processing" style="background: transparent" />
        </aura:if>
    </div>
</aura:componen
```

{% endtab %}

{% tab title="TestBulkActionComponentController.js" %}

```javascript
({
    handleSubmit: function (component, event, helper) {
        component.set('v.isWorking', true);

        //Submit the action to the Salesforce
        let action = component.get('c.submitBulkAction');
        action.setParams({
            gridLabel: component.get('v.gridLabel'),
            gridName: component.get('v.gridName'),
            actionLabel: component.get('v.actionLabel'),
            actionName: component.get('v.actionName'),
            query: component.get('v.query'),
            url: window.location.href
        });

        action.setCallback(this, function (res) {
            component.set('v.isWorking', false);
            if (res.getState() === 'SUCCESS') {
                //Publish the JobId for the monitor
                let bulkActionPublisher = component.find('bulkActionPublisher');
                bulkActionPublisher.publish(res.getReturnValue());

                //Show a toast for the end user
                let toastEvent = $A.get('e.force:showToast');

                toastEvent
                    .setParams({
                        title: 'Success',
                        type: 'success',
                        message: 'Action Executed Successfully'
                    })
                    .fire();

                component
                    .getEvent('onsuccess')
                    .setParams({
                        action: 'ActionExecuted'
                    })
                    .fire();

                //Close the modal
                component.find('overlayLib').notifyClose();
            } else if (res.getState() === 'ERROR') {
                helper.handleServerErr(res);
            }
        });

        $A.enqueueAction(action);
    },
    handleCancel: function (component, event, helper) {
        component
            .getEvent('oncancel')
            .setParams({
                action: 'ActionCancelled'
            })
            .fire();

        component.find('overlayLib').notifyClose();
    }
});
```

{% endtab %}
{% endtabs %}

### Apex Controller Classes

Our Aura component is ready, let's go ahead and implement our Apex controller. In our example, the job of the controller is straightforward; creates a Bulk Action Job and starts an Apex batch. To get the number of records to process, we just replace the **Id** with **Count().**&#x20;

The batch class track the progress of the job and keep track of the occurred errors. At the end of the batch, we close the job.&#x20;

When a job is closed, the monitor is notified and the toast message is displayed to the user.

{% tabs %}
{% tab title="TestBulkActionController" %}

```apex
public with sharing class TestBulkActionController {
    @AuraEnabled
    public static Id submitBulkAction(
        String gridLabel,
        String gridName,
        String actionLabel,
        String actionName,
        String query,
        String url
    ) {
        String countQuery = query.replaceAll('Select Id ', 'Select count()');

        //Submit the job to the action manager
        Id jobId = gmpkg.BulkActionManager.createJob(
            new gmpkg.BulkActionManager.BulkActionRequest(
                gridLabel,
                gridName,
                actionLabel,
                actionName,
                query,
                url,
                database.countQuery(countQuery)
            )
        );

        //Start the batch to process all the opportunities
        Database.executeBatch(new TestBulkActionBatch(jobId, query));
        return jobId;
    }
}
```

{% endtab %}

{% tab title="TestBulkActionBatch" %}

```apex
public with sharing class TestBulkActionBatch implements Database.Batchable<sObject>, Database.Stateful {
    public Id jobId; // Monitored jobId
    public String scopeQuery; // Query coming from the action
    public Integer totalProgress = 0; // Current progress of the job

    public TestBulkActionBatch(Id jobId, String scopeQuery) {
        this.jobId = jobId;
        this.scopeQuery = scopeQuery;
    }

    public Database.QueryLocator start(Database.BatchableContext bc) {
        //Just replace the Id with the expected columns for the our batch
        return Database.getQueryLocator(this.scopeQuery.replace('Id', 'Id, Name, StageName, CloseDate'));
    }

    public void execute(Database.BatchableContext bc, List<Opportunity> opportunities) {
        if (opportunities.size() > 0) {
            for (Opportunity opp : opportunities) {
                opp.CloseDate += 1;
            }

            //We prepare the list of BulkActionError to keep track of save errors 
            List<gmpkg.BulkActionManager.BulkActionError> errorList = new List<gmpkg.BulkActionManager.BulkActionError>();
            List<Database.SaveResult> resultList = database.update(opportunities, false);
            for (Database.SaveResult res : resultList) {
                if (!res.isSuccess()) {
                    errorList.add(new gmpkg.BulkActionManager.BulkActionError(res.getId(), JSON.serialize(res.getErrors())));
                }
            }

            //If we have errors, we report them back to the monitor
            if (errorList.size() > 0) {
                gmpkg.BulkActionManager.reportErrors(this.jobId, errorList);
            }

            //We increase the progress and we report it back to the monitor
            this.totalProgress += opportunities.size();
            gmpkg.BulkActionManager.reportProgress(this.jobId, this.totalProgress);
        }
    }

    public void finish(Database.BatchableContext bc) {
        //At the end, we close the job
        gmpkg.BulkActionManager.closeJob(this.jobId);
    }
}
```

{% endtab %}
{% endtabs %}

## Bulk Action Configuration

Our Aura component and Apex Classes are ready for use. Let's go ahead and configure the grid action as below:

```json
[
    {
        "name": "Move",
        "label": "Move",
        "bulkAction": true,
        "confirmationRequired": true,
        "component": "c:TestBulkActionComponent"
    }
]
```

{% hint style="info" %}
To trigger a **Bulk Action,** bulkAction flag should be set to true. If not the action will be considered as synchronous action and the query will not be passed to your component.
{% endhint %}

{% hint style="info" %}
If confirmationRequired is set to true, the user will be asked to select the scope of the action. It could be either the selected records or the whole filter scope. See the screenshot below.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FiFPn7HX0xJTrYo3C6vgE%2FScreenshot%202023-07-11%20at%2001.54.12.png?alt=media&amp;token=1b13bb58-d1c9-4a00-a52d-5010a75985e2" alt=""><figcaption><p>Bulk Action Scope</p></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FmNnBVBZTn0QIjx1hvam6%2FScreenshot%202023-07-11%20at%2002.00.48.png?alt=media&amp;token=0e7fecee-a4f9-431b-97b4-02a4c3b6d53c" alt=""><figcaption><p>Bulk Action Progress</p></figcaption></figure>

## Source Code

The full source code of this example is available here :point\_down:

<https://github.com/GridMate/gridmate-examples/tree/main>


# Grid - Custom Inline Component

## Introduction

All GridMate components can be used as [inline components](/advanced-guides/inline-grid-setup)  just by configuration. However there is some situations where a custom component is required to address the business needs.

To address this type of use cases, you can implement your own Aura or LWC component. Both components should have recordId as an attribute.&#x20;

{% hint style="info" %}
If the component is an Aura component, it should be declared as a global as well as  the recordId attribute.
{% endhint %}

## Aura Implementation

### Aura Component

Our use case is to display a relative date based on the close date like a timer. Let's go ahead and start our custom Aura component using Lightning Data Service and relativeDateTime lightning component.

{% tabs %}
{% tab title="CloseDateTimerComponent.cmp" %}

```html
<aura:component implements="force:hasRecordId" access="global">
    <aura:attribute name="style" type="String" access="global" />

    <aura:attribute name="recordData" type="Object" />
    <aura:attribute name="recordError" type="String" />
    <aura:attribute name="closeDate" type="Object" />

    <aura:handler name="change" value="{!v.recordData}" action="{!c.handleRecordDateChange}" />

    <force:recordData
        aura:id="recordData"
        recordId="{!v.recordId}"
        fields="Name,CloseDate"
        targetFields="{!v.recordData}"
        targetError="{!v.recordError}"
    />

    <aura:if isTrue="{! v.closeDate }">
        <div class="slds-align_absolute-center">
            Closing&nbsp;
            <span style="{!v.style}">
                <lightning:relativeDateTime value="{!v.closeDate}" />
            </span>
        </div>
    </aura:if>
</aura:component>
```

{% endtab %}

{% tab title="CloseDateTimerComponentController.js" %}

```javascript
({
    handleRecordDateChange: function (component, event, helper) {
        component.set('v.closeDate', null);

        let recordData = component.get('v.recordData');
        if (recordData && recordData.CloseDate) {
            component.set('v.closeDate', new Date(recordData.CloseDate));
        }
    }
});
```

{% endtab %}
{% endtabs %}

### Inline Component Configuration

Our Aura component is ready. Let's go ahead and configure it as an inline component as below. Note that we can have dynamic attributes to customize the behavior per grid if needed. In our example, we are passing the style of the timer.

```json
[
    {
        "component": "c:CloseDateTimerComponent",
        "attributes": {
            "style": "font-size:large;color:blue"
        }
    }
]
```

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FMjSDjQsYxU9DPHgy2s47%2FScreenshot%202024-01-09%20at%2015.02.53.png?alt=media&amp;token=a99c2fdf-c25b-41f0-b89c-f5736d91bc59" alt=""><figcaption><p>Close Date Timer - Aura</p></figcaption></figure>

## LWC Implementation

### LWC Component

LWC is also an option to implement an inline component. Below is the LWC version of the Close Date Timer component implemented above.

{% hint style="info" %}
The LWC component should be exposed. Otherwise it will not be visible to GridMate.
{% endhint %}

{% tabs %}
{% tab title="closeDateTimerLWC.html" %}

```html
<template>
    <template if:true={closeDate}>
        <div class="slds-align_absolute-center">
            Closing&nbsp;
            <span style={timerStyle}>
                <lightning-relative-date-time value={closeDate}>
                </lightning-relative-date-time>
            </span>
        </div>
    </template>
</template>
```

{% endtab %}

{% tab title="closeDateTimerLWC.js" %}

```javascript
import { LightningElement, api, wire } from 'lwc';

import { getRecord, getFieldValue } from 'lightning/uiRecordApi';

import CLOSE_DATE_FIELD from '@salesforce/schema/Opportunity.CloseDate';

export default class CloseDateTimerLWC extends LightningElement {
    @api recordId;
    @api timerStyle;

    @wire(getRecord, { recordId: '$recordId', fields: [CLOSE_DATE_FIELD] })
    recordData;

    get closeDate() {
        let oppCloseDate = getFieldValue(
            this.recordData.data,
            CLOSE_DATE_FIELD
        );

        if (oppCloseDate) {
            return new Date(oppCloseDate);
        }

        return null;
    }
}
```

{% endtab %}

{% tab title="closeDateTimerLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>58.0</apiVersion>
    <isExposed>true</isExposed>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}

### Inline Component Configuration

Let's go ahead and configure the inline component as below:

```json
[
    {
        "component": "c:closeDateTimerLWC",
        "attributes": {
            "timerStyle": "font-size:large;color:blue"
        }
    }
]
```

And obviously we get the same result as a above.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Ff1SGs2k6zeNYsMoDEp07%2FScreenshot%202024-01-09%20at%2015.20.53.png?alt=media&amp;token=0427f095-8b46-41b9-bb0c-f03f61ec02a5" alt=""><figcaption><p>Close Date Timer - LWC</p></figcaption></figure>


# Grid - Config Checker

GridMate **Config Checker** simplifies the process of verifying **GridMate Components** configuration. It helps admins identifying errors such as missing or incorrect configurations. The Config Checker is available for smart grids:

* GM - FieldSet Grid
* GM - RelatedList Grid
* GM - ListView Grid
* GM - Kanban Grid (FieldSet or ListView)

## Enable Config Checker

To enable the **Config Checker** option, edit the Lightning page in the App Builder, select the Grid and check **"Enable Config Checker"**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FQXiUHlCIrngMa1HwpvxQ%2FScreenshot%202024-04-16%20at%2009.54.39.png?alt=media&amp;token=6cc8ba2a-5d6e-4761-a89e-91a738b0422f" alt=""><figcaption></figcaption></figure>

## Config Checker Setup

Once you have enabled the **Config Checker** option, you can start checking the configuration. The video below is a step-by-step tutorial to learn how to use the **Config Checker** :point\_down:.

{% embed url="<https://youtu.be/9m8MXo9Eg2Q>" %}
**Config Checker**
{% endembed %}


# Grid - Admin Cockpit

As a Salesforce admin, GridMate provides you with the **GridMate Cockpit**, enhancing security by efficiently managing access and securing fields and actions, while also facilitating the maintenance of user grids and filters.

## Enable Admin Cockpit

To effectively utilize the **GridMate Cockpit** acquire the **GridMate Cockpit User** Permission Set.&#x20;

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fke1hsZp0VZtylRH5dmj8%2FScreenshot%202023-11-08%20at%2010.58.12.png?alt=media&amp;token=63ec0ac0-59d8-4dc0-a932-60a182679589" alt=""><figcaption><p>GridMate Permission Set</p></figcaption></figure>

## Field Access

**Field Access** feature enables admins to secure the field access of any object for a profile or a specific profile. The video below is a step-by-step tutorial to learn how to use the **Field Access**👇.

{% embed url="<https://youtu.be/iNCypJ-VAK8>" %}

{% hint style="info" %}
**Field Access** is applied only at the grid level is doesn't apply on the record page.
{% endhint %}

## Action Access

As an admin, the **Action Access** allows securing actions on a User Grid. The video below is a step-by-step tutorial to learn how to use the **Action Access**👇.

{% embed url="<https://youtu.be/D1EwoLd_aZE>" %}
Action Access
{% endembed %}

{% hint style="info" %}
**Action Access** is applicable only for User Grid. It doesn't affect other grids like GM - FieldSet Grid, GM - RelatedList Grid,...
{% endhint %}

To manage access for core actions like mass edit, they should be configured as custom metadata types using the names below:

* **gmpkg\_modalEdit** : to control modal edit
* **gmpkg\_inlineEdit** : to control inline edit
* **gmpkg\_massUpdate** : to control mass update
* **gmpkg\_modalCreate** : to control modal create
* **gmpkg\_inlineCreate** : to control inline create
* **gmpkg\_massClone** : to control mass clone
* **gmpkg\_massDelete** : to control mass delete

Below is an example for modal edit action:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<CustomMetadata xmlns="http://soap.sforce.com/2006/04/metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <label>gmpkg_modalEdit</label>
    <protected>false</protected>
    <values>
        <field>Metadata__c</field>
        <value xsi:nil="true"/>
    </values>
    <values>
        <field>Sobject__c</field>
        <value xsi:nil="true"/>
    </values>
</CustomMetadata>
```

## User Filter Maintenance

**User Filter Maintenance** enables a Salesforce admin to manage all the created filters within the org. The video below is a step-by-step tutorial to learn how to use the **User Filter Maintenance**👇.

{% embed url="<https://youtu.be/kMn5islNSU0>" %}
User Filter Maintenance
{% endembed %}

## User Grid Maintenance

**User Grid Maintenance** empowers admins to manage User Grids at the org level. User Grid can be **imported** from another org **or** **exported** to another one. The User Grid is exported like a Salesforce metadata component **(JSON format)** and therefore can be modified with widely used tools like VS Code before importing back. The video below is a step-by-step tutorial to learn how to use the **User Grid Maintenance**👇

{% embed url="<https://youtu.be/XPKledUeSPA>" %}
User Grid Maintenance
{% endembed %}

## Adoption Dashboard

GridMate's **Adoption Dashboard** is a feature-rich tool that evaluates user engagement and behavior within GridMate components by recording and displaying interactions. This dashboard improves interaction monitoring across different components. The interaction tracking framework can be used for custom and managed  component  from the app builder or from the code.

Out of the box, a production ready dashboard is provide to analyze interactions by component type, by actions...The dashboard can be cloned to address any gap.

### User Interaction Setup

To effectively utilize the Adoption Dashboard from the GM - Admin Cockpit page, assign the **GridMate Cockpit User** Permission Set to the desired user(s).&#x20;

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F3QHUujh9t9aNX0KqrFJ3%2FScreenshot%202023-11-08%20at%2010.58.12.png?alt=media&amp;token=bc22d0ee-3edf-4053-9fa3-b1ac4655264b" alt=""><figcaption><p><strong>interaction telemetry</strong></p></figcaption></figure>

Enable **Interaction Telemetry** in the Telemetry Settings at the org level or per user/profile. With this flexibility admin can track a subset of users during a rollout period.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FwUsTgF6xRQ4o98Bnmgf4%2FScreenshot%202024-04-16%20at%2010.09.45%201.png?alt=media&amp;token=64c7462a-cdaa-4cfb-b9cb-80460359739d" alt=""><figcaption><p><strong>interaction telemetry</strong></p></figcaption></figure>

### **Interaction Monitor Setup**

In addition to **Interaction Telemetry** activation, the admins have to configure the **GM - Interaction** **Monitor** Utility bar. Using the Utility Bar gives the flexibility to track only a specfic lightning app. Below are the steps to configure it:

1. Go to Setup and on the quick find box search for **App Manager**
2. Select the lightning app to which you want to add the **GM - Interaction Monitor**, then click **Edit**.
3. Click on **Utility Items**, and search for **GM - Interaction Monitor**
4. Select **GM - Interaction Monitor** and configure the Utility Bar as below:
   * Label : **(‎‎‎‎‎‎‎‎ㅤ)**
   * Icon : **No icon**
   * Panel Width : **1**
   * Panel Height : **1**
   * Start automatically : **Checked**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FiIK3d07UYm25gt7gRIGo%2FScreenshot%202024-04-16%20at%2010.44.13.png?alt=media&amp;token=20638912-4e3d-4b5d-987b-a90a1e620c12" alt=""><figcaption><p><strong>GM - Interaction Monitor</strong></p></figcaption></figure>

{% hint style="info" %}
The label is set to non empty invisible character. Just copy paste the text between 👉 **(‎‎‎‎‎‎‎‎ㅤ)**
{% endhint %}

{% embed url="<https://youtu.be/vteIyXAQ25A>" %}
Adoption Dashboard
{% endembed %}


# Grid - File Upload Column

GridMate's file upload feature enables users to upload files directly into a grid view, simplifying data management and boosting user efficiency.

### **Formula Field** Setup <a href="#dynamic-formula-field-setup" id="dynamic-formula-field-setup"></a>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FS6UPizeDcJZ6vAZZh2VE%2FScreenshot%202025-07-08%20at%2016.23.44.png?alt=media&amp;token=2b6a08be-32bc-4f30-996c-41e16b45b912" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Ensure you add the formula field column to your grid.

The result of the formula field should be an **Id.** This Id is used to link the uploaded file.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FV54T4PTyIVyQaaSBEXXt%2FScreenshot%202025-07-08%20at%2016.37.31.png?alt=media&amp;token=e2d26895-4440-4d1e-be67-cd61d7bd6c44" alt=""><figcaption></figcaption></figure>

Once you have created the **Formula Field** and added the column to your grid, you can begin uploading your files. The video below provides a step-by-step tutorial on using the **Grid - File Upload Column** 👇.

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


# Grid - File List Column

GridMate’s File List cell type introduces structured multi-file support within grid cells, enabling direct upload, visualization, and deletion without leaving the grid context.

### **Formula Field** Setup <a href="#dynamic-formula-field-setup" id="dynamic-formula-field-setup"></a>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FzKxksWyLbMWLsNOP4DDv%2FScreenshot%202026-02-12%20at%2021.38.35.png?alt=media&amp;token=7594a23e-ccba-4e71-8732-54c6bba9364e" alt=""><figcaption></figcaption></figure>

Below is the formula configuration used in this demo:

```javascript
LWC("gmpkg/dataGridFileListCellLWC","maxVisibleFiles", 2, "maxPillWidth", 180)
```

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FQdMaQFPR8UecYnpPFHwD%2FScreenshot%202026-02-12%20at%2021.41.19.png?alt=media&amp;token=8f928f1f-6120-4952-9a8a-ddf92dd6bf97" alt=""><figcaption></figcaption></figure>

Once you have created the **Formula Field** and added the column to your grid, you can start managing your files. The video below provides a step-by-step tutorial on using the **Grid - File List Cell** 👇.

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


# Grid - Address Column

{% hint style="warning" %}
LWS must be activated in your organization to access this feature.
{% endhint %}

GridMate provides a **Grid - Address Column**  that allows users to input their exact location into a grid with an autocomplete feature, enhancing user experience and data accuracy.

### &#x20;Column Configuration

Below the JSON Config for the formula field.

```coffeescript
LWC("gmpkg/dataGridAddressCellLWC",
"streetField",
"BillingStreet",
"cityField",
"BillingCity",
"postalCodeField",
"BillingPostalCode",
"stateField",
"BillingState",
"countryField",
"BillingCountry",
"latitudeField",
"BillingLatitude",
"longitudeField",
"BillingLongitude",
"autoCompleteHandler",
"GeoApifyAutoCompleteHandler"
)
```

{% hint style="info" %}
You need an autocomplete handler (e.g., `GeoApifyAutoCompleteHandler`) that provides location suggestions based on user input.

The Address Column component is able to manage any address either a standard or custom field. We are able to handle the mapping  through the component parameters.
{% endhint %}

### Column Setup

Below is a step by step tutorial to configure the **Grid - Address Column**.

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


# Grid - Custom Column

{% hint style="warning" %}
LWS must be activated in your organization to access this feature.
{% endhint %}

## Introduction

GridMate renders every column with a built-in cell type based on the field type (text, picklist, lookup, date, file...). However there is some situations where a specific rendering or a specific editing experience is required to address the business needs: a rating widget, a color picker, a progress bar, a slider...

To address this type of use cases, you can bring your own Lightning Web Component and let the grid render it in the cell, in view mode as well as in edit mode. A custom cell is a [Dynamic Formula Field](/advanced-guides/grid-dynamic-formula-field) whose **Type** is **Custom** and whose formula returns the `LWC()` function.

```javascript
LWC("c/ratingCellLWC", "field", "Rating__c", "max", 5)
```

* The first argument is the component to render: `c/<componentName>` for a component of your org, `gmpkg/<componentName>` for a component shipped by GridMate.
* The next arguments are name/value pairs. Each pair is passed to the component as a public property.

{% hint style="info" %}
`LWC()` is available in the formula editor under the **Other** functions. See [Javascript Formulas](/package-reference/javascript-formulas) for the complete syntax.
{% endhint %}

## Cell Component Interface

GridMate defines an interface which is a set of properties, events and optional methods.

### Properties

The grid passes the following properties to the component. Any name/value pair defined in the `LWC()` function is passed as an additional property.

```javascript
// The Id of the master record (record page or master record)
@api recordId;
// The row being rendered (all the fields loaded by the grid)
@api item;
// The column definition (name, label, type...)
@api column;
// true when the grid is in view mode, false when the grid is in edit mode
@api readMode;
```

{% hint style="info" %}
The same component instance is used in view mode and in edit mode. `readMode` is updated when the user switches the grid to edit mode, so the component is responsible for rendering both experiences.
{% endhint %}

### Events

```javascript
// Event to be fired when the user changes the value
// detail.value is an object of field API name => value
this.dispatchEvent(
    new CustomEvent('valuechanged', {
        detail: {
            value: { Rating__c: 4 }
        }
    })
);
```

The value of the `valuechanged` event is merged into the row. Therefore a single cell can update several fields of the record at once, e.g. `{ BillingCity: "Paris", BillingCountry: "France" }`. The fields are saved with the rest of the row when the user saves the grid.

### Methods

The following methods are optional. Implement them only when needed.

```javascript
// Called before saving the grid. Return false to block the save.
@api
reportValidity() {
    return true;
}

// Called when a value is pushed to the cell (e.g. Mass Update)
@api
setValue(newValue) {}
```

## Step by Step Implementation

### LWC Component

Our use case is to display a star rating in the grid. In view mode, the stars are displayed as text. In edit mode, the user clicks a star to set the rating. The rating is stored in a number field, whose API name is passed to the component through the `field` property.

{% tabs %}
{% tab title="ratingCellLWC.html" %}

```html
<template>
    <template lwc:if={readMode}>
        <span class="slds-truncate" title={ratingLabel}>{ratingLabel}</span>
    </template>

    <div lwc:else class="slds-grid slds-grid_vertical-align-center">
        <template for:each={stars} for:item="star">
            <lightning-button-icon
                key={star.value}
                data-value={star.value}
                variant="bare"
                size="small"
                icon-name={star.icon}
                alternative-text={star.title}
                title={star.title}
                onclick={handleStarClick}
            ></lightning-button-icon>
        </template>
    </div>
</template>
```

{% endtab %}

{% tab title="ratingCellLWC.js" %}

```javascript
import { LightningElement, api } from 'lwc';

export default class RatingCellLWC extends LightningElement {
    // Properties passed by the grid
    @api recordId;
    @api item;
    @api column;
    @api readMode;

    // Properties passed by the LWC() formula
    @api field;
    @api max = 5;

    rating = 0;

    connectedCallback() {
        this.rating = Number(this.item[this.field]) || 0;
    }

    get maxStars() {
        return Number(this.max) || 5;
    }

    get ratingLabel() {
        return (
            '★'.repeat(this.rating) +
            '☆'.repeat(Math.max(this.maxStars - this.rating, 0))
        );
    }

    get stars() {
        return Array.from({ length: this.maxStars }, (_, index) => {
            const value = index + 1;

            return {
                value,
                icon:
                    value <= this.rating
                        ? 'utility:favorite'
                        : 'utility:favorite_alt',
                title: `${value} / ${this.maxStars}`
            };
        });
    }

    @api
    reportValidity() {
        return true;
    }

    @api
    setValue(newValue) {
        this.rating = Number(newValue) || 0;
    }

    handleStarClick(event) {
        this.rating = parseInt(event.currentTarget.dataset.value, 10);

        // Notify the grid: the value is saved with the row
        this.dispatchEvent(
            new CustomEvent('valuechanged', {
                detail: {
                    value: { [this.field]: this.rating }
                }
            })
        );
    }
}
```

{% endtab %}

{% tab title="ratingCellLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>65.0</apiVersion>
    <isExposed>true</isExposed>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}

### Column Configuration

Our LWC component is ready. Let's go ahead and add the custom column to the grid:

1. Open the **Config. Wiz** of the grid and go to the **Formulas** tab.
2. Set the **Type** to **Custom** and set the **Label** of the column (e.g. Rating).
3. Set the formula as below, click **Check Syntax** then **Add Formula**.

```javascript
LWC("c/ratingCellLWC", "field", "Rating__c", "max", 5)
```

4. Copy the generated **Formulas** JSON into the **Formula Columns** property of the grid in the App Builder.

{% hint style="info" %}
When **Enable Create Formula** is checked on the grid, end users can also create custom columns from the grid toolbar using **Create Formula**.
{% endhint %}

## Creating Child Records from a Cell

A custom cell is not limited to the fields of its own row: the value it pushes to the grid can also carry records of another object. The grid saves them with the row, in the same save, and reports their errors on the row. Combined with an External Id, a cell can even create the children of a row that does not exist yet: the parent and its children are created in one save.

### Child records

Add to the `valuechanged` value a key ending with `__r` (any name, e.g. `Attendees__r`) whose value is the list of child records. Each child record carries:

* `attributes.type` — the API name of the child object.
* `UID` — the `UID` of the row, so that save errors are reported on the row.
* `gm__fieldLevel: -1` — the child is saved after the row.
* The fields of the child record. To delete an existing child, send its `Id` with `attributes.deleted` set to `true`.

```javascript
this.dispatchEvent(
    new CustomEvent('valuechanged', {
        detail: {
            value: {
                Attendees__r: [
                    // New child record
                    {
                        UID: this.item.UID,
                        gm__fieldLevel: -1,
                        Event__c: this.item.Id,
                        Attendee__c: userId,
                        attributes: { type: 'Event_Attendee__c' }
                    },
                    // Existing child record to delete
                    {
                        UID: this.item.UID,
                        gm__fieldLevel: -1,
                        Id: attendee.Id,
                        attributes: { type: 'Event_Attendee__c', deleted: true }
                    }
                ]
            }
        }
    })
);
```

### Linking children to a new row

When the row is being created, it has no `Id` yet, so the child cannot reference it through the lookup field. Instead, the child references the parent through the relationship field (`Event__r`) as a nested record without `Id` carrying an External Id:

```javascript
{
    UID: this.item.UID,
    gm__fieldLevel: -1,
    Attendee__c: userId,
    Event__r: {
        attributes: { type: 'Event' },
        ExternalId__c: this.item.ExternalId__c
    },
    attributes: { type: 'Event_Attendee__c' }
}
```

The grid inserts the row first, then the children, and Salesforce resolves the parent by its External Id. The row needs a unique External Id before it is saved: stamp it through the **Default Values** property with an Apex default value provider (see [Grid - Advanced Configuration](/advanced-guides/grid-configuration#apex-default-value-provider)):

```json
{
    "ExternalId__c": "$APEX.ActivityExternalIdProvider()"
}
```

{% hint style="warning" %}

* The External Id field must be flagged **External ID** and **Unique**.
* Send only the External Id in the nested parent record.
  {% endhint %}


# Grid - Edit Single Cell

**Grid - Edit Single Cell** feature allows users to update individual data fields within a grid without opening the entire record. This streamlined capability enhances data management by enabling quick adjustments.

## Enable Edit Single Cell&#x20;

To enable the **Cell Editing** option, edit the Lightning page in the App Builder, select the Grid and check **"Enable Cell Editing"**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Ff3GEffgMyE34NO5KOxeP%2FScreenshot%202025-07-15%20at%2014.15.47.png?alt=media&amp;token=b9ccc612-e73c-453f-9ece-def6c0b7d7a3" alt=""><figcaption></figcaption></figure>

## &#x20;Edit Single Cell Setup

Once you have enabled the **Cell Editing** option, you can start checking the configuration. The video below is a step-by-step tutorial to learn how to use the **Cell Editing** 👇.

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


# Grid - Edit Parent Fields

GridMate now supports in-grid editing of parent fields a significant step forward in how teams manage relational data. By enabling direct edits within the grid interface, we remove friction from the workflow and reduce context switching.

## Enable Edit Parent Fields&#x20;

Enable the **Parent Field Editing** feature to edit parent fields directly on your grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FuclnW7MCcr3BrOMoxDnK%2FScreenshot%202025-07-30%20at%2011.12.18.png?alt=media&amp;token=3b609787-1c80-4541-ac7d-4933e7495d1c" alt=""><figcaption></figcaption></figure>

## Edit Parent Fields Setup

Once you have enabled the **Parent Field Editing** option, you can start editing the parent fields. The video below is a step-by-step tutorial to learn how to use the **Edit Parent Fields**👇.

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


# Grid - Advanced Export

## Overview

GridMate provides advanced export configuration designed for precision, efficiency, and control. With Export Templates, Predefined Export, Formatted Excel and Date Formatting, you can ensure every export is tailored to your needs removing unnecessary data, enforcing consistency, and significantly reducing manual overhead.

## Export Template

**Export Template** allows you to specify which columns to export from your grids. Create a template to export only the necessary columns, avoiding unwanted data and manual cleaning.

Below is a step-by-step tutorial to help you configure your **Export Template** and use it effectively👇.

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

```json
{
    "columns": [
        "Id",
        "Name",
        "CloseDate",
        "StageName"
    ]
}
```

## Predefined Export

The **Predefined Export** feature lets you preset export options like file format, record IDs, filters, template, and file name. This saves time and reduces errors.

Below is a step-by-step tutorial to help you configure your **Predefined Export** and save time during the export process👇.

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

Below is an example of the **Predefined Export**.

```coffeescript
[
    {
        "name": "gmpkg_export",
        "label": "Export",
        "global": true,
        "component": "gmpkg:DataGridExportComponent",
        "attributes": {
            "format": "xls",
            "withoutRecordId": true,
            "autoSelectTemplate": true,
            "filename": "File Name"
        }
    }
]
```

## Formatted Excel

The **Formatted Excel** format exports the grid as a styled workbook. Cell coloring follows the grid's **Marker Coloring** rules, and the grid's **Group By** and **Aggregate** configuration is reproduced in the sheet:

* A shaded, bold header row per value of the first **Group By** field, showing the value and the record count, e.g. `Prospecting(12)`, followed by the records of that group.
* A bold white-on-blue **Total** row at the bottom with the aggregated values.

Select **Formatted Excel** in the Export dialog, or preset it in a **Predefined Export**:

```json
"format": "formatted-xls"
```

## Date and Datetime Formatting

### Date Formatting

GridMate enables customizable export date formats, allowing users to define their own formats when exporting grid data. This flexibility helps teams align exports with reporting requirements or regional preferences.

#### Date Format Setup

1. Go to **Setup** by clicking the **gear** icon.
2. Search for and open **Custom Settings**.
3. **Manage** **Data Grid Settings**, then click **Edit**.
4. Scroll to the **Export** **Date Format** section.
5. Enter a **custom format** like `YYYY-MM-DD` or set **`$Locale.dateFormat`**.
6. Click **Save** to apply the changes.

{% hint style="info" %}
`$Locale.dateFormat` uses the **user's default date format settings** to display dates during export.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FKTacoZNN1hpuYIJUgxgU%2FScreenshot%202025-09-24%20at%2016.10.37.png?alt=media&#x26;token=7885b998-05d2-4cd4-8cd2-db88ca645de3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The configuration for date formatting is identical to that of datetime formatting. Refer to the [demo below](#datetime-format-demo).
{% endhint %}

### Datetime Formatting

GridMate provides **Export Datetime Format** customization, allowing users to define custom date-time formats for export grid data. This gives teams flexibility to match exports with reporting standards or regional preferences.

#### Datetime Format Setup

1. Go to **Setup** by clicking the gear icon.
2. Search for and open **Custom Settings**.
3. **Manage** **Data Grid Settings**, then click **Edit**.
4. Scroll to the **Export** **DateTime Format** section.
5. Enter a **custom format** like `YYYY-MM-DD HH:MM:SS` or set **`$Locale.datetimeFormat`**.
6. Click **Save** to apply the changes.

{% hint style="info" %}
`$Locale.datetimeFormat` uses the **user's default date format settings** to display dates during export.
{% endhint %}

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FATcDX6dTaN9f6FiBKvQv%2FScreenshot%202025-08-04%20at%2010.10.51.png?alt=media&#x26;token=2a3f65b2-a0f2-4b76-a4ee-eab4971f529d" alt=""><figcaption></figcaption></figure>

#### Datetime Format Demo

Below is a step by step tutorial how to set and configure the **Datetime Format** for the export.

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


# Grid -  Advanced Import

## Overview

GridMate provides advanced **import** configuration built for precision, efficiency, and full control. With predefined import mappings and options, every import can be customized to your exact requirements eliminating unnecessary data processing, enforcing consistent structures, and significantly reducing manual effort.

## Import Mapping

Import mapping allows you to precisely define how incoming data fields correspond to your grid columns, ensuring accurate alignment, structured data organization, and robust integration across every import eliminating the need to manually remap fields every time you import data.

{% hint style="info" %}
The import wizard can automatically recognize and map fields using two methods:

1. **Label Matching:** When the column header in the source file matches the Salesforce field label.
2. **API Name Matching:** When the column header matches the Salesforce field API name.
   {% endhint %}

Below is a step-by-step guide on how to create the **mapping** �&#xDC47;**:**

To create a mapping, you must first **map** your columns during the **Field Mapping** step of the import process.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FQp2mIMaKznRIOD4rwaIl%2FScreenshot%202026-02-17%20at%2013.21.38.png?alt=media&amp;token=408fadd9-34a6-4b84-8145-ab81e5821a06" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Keep in mind that you can update an existing mapping at any time.
{% endhint %}

Save your **mapping** during the **validation step** by giving it a **name** and submitting it. This will create a reusable mapping template for future imports.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FTrkLnGN8l4oAqJSvTucf%2FScreenshot%202026-02-17%20at%2013.21.14.png?alt=media&amp;token=a843ce87-f253-48e4-8a1d-3b7cd88c1fec" alt=""><figcaption></figcaption></figure>

After saving your mapping, you can reuse it by selecting it from the **mapping list** during future imports.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F1RvScCKm5ZXp89o4Fa85%2FScreenshot%202026-02-17%20at%2013.18.58.png?alt=media&amp;token=46baf0a2-085a-479a-ad3e-17a7c800029b" alt=""><figcaption></figcaption></figure>

## Import Options

```json
{
    "delimiter": ";",
    "previewSize": "25",
    "operation": "insert",
    "batchsize": "50",
    "automapping": {
        "AccountId": {
            "type": "defaultValue",
            "value": "$recordId"
        }
    },
    "preprocessing": [
        {
            "type": "convert",
            "operation": "convertPickList",
            "attributes": {
                "field": "StageName"
            }
        },
        {
            "type": "convert",
            "operation": "convertPickList",
            "attributes": {
                "field": "gmpkg__Discount__c"
            }
        },
        {
            "type": "convert",
            "operation": "resolveLookup",
            "attributes": {
                "mappedField": "gmpkg__Sponsor__c",
                "lookupField": "gmpkg__Sponsor__c",
                "refObjName": "Contact",
                "titleField": "Name"
            }
        }
    ]
}
```


# Grid - Apply & Save

## Apply & Save Setup

To allow users to permanently save their grid configurations, follow these steps:

1. Go to **Setup**, type **Custom Settings** in the Quick Find box.
2. Click **Manage** DataGrid Settings.
3. Configure Options: Check the following boxes:
   * Apply & Save **Columns**
   * Apply & Save **Sorting**
   * Apply & Save **Filters**
   * Apply & Save **GroupBy**
4. Click **Save** to apply the changes.

Once this configuration is activated, users will be able to use the **Apply & Save** feature

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FBHGXsvAt1jNy5r9cevlE%2FScreenshot%202026-02-13%20at%2009.56.07.png?alt=media&amp;token=34e9396e-8b79-403a-b101-b01dcc5bf523" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F7uMgAh3KCHv6G7l6puxQ%2FScreenshot%202026-02-13%20at%2009.56.59.png?alt=media&amp;token=b9434de6-b173-47f2-a7e4-d803d88c86d4" alt=""><figcaption></figcaption></figure>

## Apply & Save Demo

Once **Apply & Save** is enabled, users can choose whether their grid changes are temporary or permanently saved.

The video below provides a step-by-step tutorial on how to use **Apply & Save** 👇

{% embed url="<https://youtu.be/kdTYHZ-hThs>" %}


# Grid - Charts

GridMate **Charts** feature allows you to display aggregated data from your grid in a graphical format. It helps users understand their filtered data at a glance. The Chart feature is available for **GridMate Smart Grids**.

## Enable Charts

To enable the **Charts** option:

1. Edit the Lightning page in the App Builder.
2. Select the Grid.
3. Scroll down until you see the **"Charts"** property.
4. Paste in your charts configuration.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FwQHfOy5mT0v0JuABt3kq%2FScreenshot%202026-04-29%20at%2011.09.59.png?alt=media&amp;token=258f064a-d94d-4194-91be-d02e62ecbeda" alt=""><figcaption></figcaption></figure>

## Charts Configuration

The **Charts** property accepts a JSON array, where each object in the array defines a single chart. You can configure as many charts as you'd like.

Each chart object is built from a few required fields that describe *what* to display, plus optional fields for labeling and fine-tuning the visual output.

### **Required fields**

* `title` — The heading displayed above the chart. This is what users see, so make it descriptive (e.g., `"Revenue by Stage"` rather than `"Chart 1"`).
* `chartType` — The visualization style. Supported values are `"pie"`, `"bar"`, and `"donut"`. The chart type determines the default orientation and shape; see the `options` field below for variations like horizontal bars.
* `groupByField` — The Salesforce field API name used to group records into chart segments or categories. Each unique value in this field becomes a slice (pie/donut) or a bar. For example, using `"StageName"` on Opportunities produces one segment per stage.
* `aggregateField` — The Salesforce field API name whose values are aggregated within each group. This is the numeric or currency field that determines the size of each segment.
* `aggregateOp` — The aggregation operation applied to `aggregateField`. Common values include `"SUM"`, `"COUNT"`, `"AVG"`, `"MIN"`, and `"MAX"`.
* `aggregateType` — The data type of the aggregated value, used for formatting labels and tooltips. Use `"currency"` for monetary values, `"number"` for plain numerics, and `"percent"` for percentages.

### **Optional fields**

* `datasetLabel` — A label shown in the chart's legend or tooltip describing the dataset (e.g., `"Sum of Amount"`). Useful when the title alone doesn't make the metric explicit.
* `options` — A nested object passed through to the underlying chart renderer for advanced customization. The most common use is flipping a bar chart's orientation:

```json
"options": {
    "indexAxis": "y"
}
```

{% hint style="info" %}
Setting `indexAxis` to `"y"` produces a horizontal bar chart; the default `"x"` produces a vertical one.
{% endhint %}

Below is a configuration example👇.

```json
[
    {
        "title": "Revenue by Stage (pie)",
        "chartType": "pie",
        "groupByField": "StageName",
        "aggregateField": "Amount",
        "aggregateOp": "SUM",
        "aggregateType": "currency"
    },
    {
        "title": "Revenue by Stage (H-Bar)",
        "chartType": "bar",
        "groupByField": "StageName",
        "aggregateField": "Amount",
        "aggregateOp": "SUM",
        "aggregateType": "currency",
        "datasetLabel": "Sum of Amount"
    },
    {
        "title": "Revenue by Stage (V-Bar)",
        "chartType": "donut",
        "groupByField": "StageName",
        "aggregateField": "Amount",
        "aggregateOp": "SUM",
        "aggregateType": "currency",
        "datasetLabel": "Sum of Amount",
        "options": {
            "indexAxis": "y"
        }
    }
]
```

## Charts Setup

Below is a step by step tutorial to configure the **Grid - Charts** 👇.

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


# User Grid - Split View

GridMate provides the **Grid - User Grid Split View** component to assist users in achieving a clearer view of the User Grids and facilitating easier grids management.

In this tutorial, we will configure **Grid - User Grid Split View** component by showing how to Create a new Lightning page, and add the component to a lightning page.&#x20;

1. Create new Lightning pages in the Lightning App Builder.
2. From components list, drag and drop the component **Grid - User Grid Split View**.
3. The grid component is now ready for configuration in the Lightning App Builder.
4. The property values can be configured to tailor the data grid to the needs of the end-user.
5. To perform a quick configuration, populate the properties below:&#x20;
   * Target Object : **Opportunity**
   * Default Grid : **Pipeline\_Opportunity Grid\_9cv0w**
   * List Label : **User Grid**
   * Grid Filter : `{ "Name": { "operator": "in", "value": "('GM Opportunity Grid','Pipeline Opportunity Grid')" } }`
   * View Height : **9999**

{% hint style="info" %}
Specifying the **Target Object** is optional.
{% endhint %}

{% hint style="info" %}
The **Grid Filter** adds a second layer of filtering, applied after the initial **Target Object** filter.
{% endhint %}

## Grid - User Grid Split View Setup

Below is a step by step tutorial to configure the **Grid - User Grid Split View** component.

{% embed url="<https://youtu.be/OS5A2PAIIkc>" %}
Grid - User Grid Split View
{% endembed %}


# User Grid - Dynamic Interactions

**GridMate's User Grid - Dynamic Interactions** feature offers users efficient interaction with related data on one screen. This enhances user experience by minimizing navigation and clicks.

## Enable Dynamic Interactions

Enable Dynamic Interaction option allows the component to publish events that can be leveraged by GM - Dynamic FieldSet Grid. This component is useful to create dynamic interaction experience.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fqkbn7bcQ52MxeLuEHNCN%2FScreenshot%202025-07-17%20at%2000.33.10.png?alt=media&amp;token=83cae1b3-2abe-4831-b4c9-9c66dd3f21a0" alt=""><figcaption></figcaption></figure>

## Dynamic Interactions Setup

Once you enable the **Dynamic Interactions** option, you can begin creating dynamic interactions. The video below is a step-by-step tutorial to learn how to use the **User Grid - Dynamic Interactions**👇.

{% embed url="<https://youtu.be/WZujco-QKrk>" %}


# User Grid - Data Filtering

GridMate provides two methods for filtering the data: The **Advanced Filter** allows you to create more complex and intricate filters, while the **Quick Filter** provides an easy way to explore the grid without delving deeper into the conditions.

## Quick Filter&#x20;

GridMate provides flexible **Quick Filter** tools similar to the one provided by Salesforce standard UI. The filter is dynamic based on the filed type:

* **Lookup Picker** for lookup fields.
* **Range** for dates, date times, currencies, percentages and other number fields.
* **Multiple Choice** for PickList and Multi-Picklist fields.
* **Radio Button** for checkbox fields.
* **Multiple Entries** for text fields.

The video below is a step-by-step tutorial to learn how to use the **Quick Filtering**👇.

{% embed url="<https://youtu.be/hSAuRkBYBD8>" %}
Quick Filter
{% endembed %}

## Advanced Filter&#x20;

GridMate offers flexible and powerful **Query Builder.** Using this tool, the end user will be able to build advanced filters including:

* **Simple Condition** : a basic condition to apply on a single field using an operator (<, >, =,...) and optionally a value to compare with.
* **Complex Condition**: an OR/AND junction that involves multiple single or complex conditions. With this formalism, we can express any logical condition.
* **Cross Filters**: a condition to check the existence or not of an child record. A Cross Filter could also expressed using simple condition to filter the child records.

The video below is a step-by-step tutorial to learn how to use the **Advanced Filtering**👇.

{% hint style="info" %}
The quick filters are automatically converted into an advanced filter. Remember that you can upgrade the quick filter to an advanced filter, But the inverse process is not allowed.
{% endhint %}

{% embed url="<https://youtu.be/kWq4V823l_Y>" %}
Advanced Filter
{% endembed %}

Behind the scene, the Query Builder produces a **JSON** like filter used by GridMate components. Below is the produced configuration for the tutorial above.

```json
{
    "and": [
        {
            "StageName": {
                "operator": "in",
                "value": "('Prospecting','Qualification','Needs Analysis','Proposal/Price Quote')"
            }
        },
        {
            "or": [
                {
                    "Amount": {
                        "operator": ">=",
                        "value": "5000"
                    }
                },
                {
                    "CloseDate": {
                        "operator": "=",
                        "value": "THIS_YEAR"
                    }
                }
            ]
        },
        {
            "with OpportunityContactRoles": {
                "operator": "with",
                "field": "OpportunityId",
                "childSObject": "OpportunityContactRole",
                "value": {}
            }
        }
    ]
}
```


# User Grid - Deployment Process

GridMate offers two deployment options for User Grids: a graphical interface through the **Admin Cockpit** and [**SF CLI Plugin**](/tools/sf-cli-plugin). The scenario in this tutorial is to create Accounts and Contacts User Grids and move them from org to another. User Grids exported in Salesforce metadata like format (JSON), can be easily modified using popular tools like VS Code before importing them back.

## Prerequisites

### Enable GridMate Advanced User&#x20;

* Go to setup, and on the quick find Box search for Users.
* Click on the desired **Full Name.**
* Click on Permission Set Assignments.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FAmA5hcDi66avQFn9Pdbb%2FScreenshot%202023-11-22%20at%2010.52.02.png?alt=media&amp;token=0306a9ac-6fb4-4d29-93d7-4bcc99d4d910" alt=""><figcaption></figcaption></figure>

* Click on permission set assignments.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Ffc8Tw3fi3vPlL0xrJCrV%2FScreenshot%202023-11-21%20at%2011.36.22.png?alt=media&amp;token=b84c1a41-10cb-4095-b8be-481bfdde0d00" alt=""><figcaption></figcaption></figure>

* Click on edit assignments.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FczPNmXmRHo38MXpRxXis%2FScreenshot%202023-11-21%20at%2011.37.32.png?alt=media&amp;token=d2b35e69-4c1c-4848-ab50-38541f666d5b" alt=""><figcaption></figcaption></figure>

* Enable **GridMate Advanced User**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FiJwfrFSg1D3tzwbdISkW%2FScreenshot%202023-11-22%20at%2011.02.45.png?alt=media&amp;token=4a5b5288-1434-4d08-8724-d64d1c4fb01d" alt=""><figcaption></figcaption></figure>

### Enable GridMate Cockpit User&#x20;

* Go to setup, and on the quick find Box search for Permission Sets.
* Click on the **GridMate Cockpit User**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F4i7zOH9nHdue9fEOv83x%2FScreenshot%202023-11-21%20at%2011.34.15.png?alt=media&amp;token=ad910684-6c4c-4598-b69e-0a1c9e63059d" alt=""><figcaption></figcaption></figure>

* Click **Manage Assignments**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FouEfJ9TisFvx0y8Iwo4J%2FScreenshot%202023-11-21%20at%2011.34.57.png?alt=media&amp;token=de0391bc-0cb5-4536-bcdd-37bb35f2b274" alt=""><figcaption></figcaption></figure>

* Ensure the existence of desired user, if not, click **Add Assignment** to add it.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fegq7zRCScgrULzXuIfBx%2FScreenshot%202023-11-21%20at%2011.35.18.png?alt=media&amp;token=1a51c663-d5c3-4bdc-b91e-c36d40cb0a34" alt=""><figcaption></figcaption></figure>

### SF Cli Plugin Setup

* Clone the repository.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FtgDXvWeUGC0NjKBAShUi%2FScreenshot%202023-11-21%20at%2014.52.48.png?alt=media&amp;token=23a36977-d193-43c5-9cb3-e9fa11a6529f" alt=""><figcaption></figcaption></figure>

```
git clone https://github.com/GridMate/gridmate-sf-plugin
```

* Go to the plugin directory and Install npm modules.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Ft1Q9jXizxX3cFjl7tJPK%2FScreenshot%202023-11-21%20at%2014.54.17.png?alt=media&amp;token=69b5d18c-623e-4cfe-96e4-c076aa7d1fe3" alt=""><figcaption></figcaption></figure>

```
npm install
```

* Link the plugin to your cli installation.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fi0DIPuR7rh6iczfzDRNo%2FScreenshot%202023-11-23%20at%2001.00.04.png?alt=media&amp;token=4c0a5cf7-ff32-4411-9140-71215209984e" alt=""><figcaption></figcaption></figure>

```
sf plugins link .
```

## User Grids Setup

We are now ready to start using the **GridMate User Grid** to create **Accounts** and **Contacts** Grids.

### Accounts User Grid

* On the App Launcher search for **GM - User Grids**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FnT6aNz9kEcF8PFJN0xj7%2FScreenshot%202023-11-22%20at%2011.06.40.png?alt=media&amp;token=4388a7b9-b048-4b2f-a841-abbf6051e3ed" alt=""><figcaption></figcaption></figure>

* Click New.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FeFJ4CNVlWN4P6DMkeqdt%2FScreenshot%202023-11-21%20at%2012.24.52.png?alt=media&amp;token=de2f9112-1172-4b74-a057-baf957745058" alt=""><figcaption></figcaption></figure>

* Create Accounts User Grid:
  * Object Name: **Account**
  * List View: **All Accounts**
  * Grid Name: **Accounts**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FyhabA5kjXna3cTni9vgN%2FScreenshot%202023-11-21%20at%2012.25.37.png?alt=media&amp;token=cd7d9aa7-eeca-4d3e-9ad4-1d3964780de8" alt=""><figcaption></figcaption></figure>

### Contacts User Grid

* Create Contacts User Grid:
  * Object Name: **Contact**
  * List View: **All Contacts**&#x20;
  * Grid Name: **Contacts**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FSm5RVqy2XoQMEIlyVMAx%2FScreenshot%202023-11-21%20at%2012.26.04.png?alt=media&amp;token=c9b69f6a-e90c-4757-acfe-0a45892b5104" alt=""><figcaption></figcaption></figure>

### Inline Component Setup

* Go to **Config Wizard** on the **Accounts** User Grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fyuk8Pa5bYZKct9lxovOh%2FScreenshot%202023-11-21%20at%2012.26.43.png?alt=media&amp;token=6e0e6a16-7822-4bbf-aaed-89b0beae4998" alt=""><figcaption></figcaption></figure>

* Select the **inline Components** tab.
* User Grid : **Contacts**.
* Condition :&#x20;

  ```json
  {
      "and": [
          {
              "AccountId": {
                  "operator": "=",
                  "value": "$recordId"
              }
          }
      ]
  }
  ```

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FNCF68rc4TnIC57ydTMX4%2FScreenshot%202023-11-21%20at%2012.28.08.png?alt=media&amp;token=ea3387b9-f848-4ad0-bdeb-be638c6f12e5" alt=""><figcaption></figcaption></figure>

## User Grids Deployment

### Deployment Using **Admin Cockpit.**

The Accounts and Contacts User Grids are created and the inline component is also configured, we can start the Deployment using **Admin Cockpit**.

#### User Grids Export

* On the App Launcher search for the **GM - Admin Cockpit**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FMI1NRNBnO18DS4zjnBop%2FScreenshot%202023-11-21%20at%2015.33.04.png?alt=media&amp;token=90d565f3-3f79-43c6-8be1-45ca2612a632" alt=""><figcaption></figcaption></figure>

* Select the **User Grid Maintenance.**
* Select the the **Accounts** and **Contacts** User Grids.
* Click **Export** to export them.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FjqYxlEXHeXPHLYlSIWvB%2FScreenshot%202023-11-21%20at%2015.35.09.png?alt=media&amp;token=0bddc723-ecf4-42ce-aa19-9ffa6c80e385" alt=""><figcaption></figcaption></figure>

* Open the **Accounts** User Grid using **Visual Studio Code** for example:

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FE7BpQEqtxiFz9w6P2Zhp%2FScreenshot%202023-11-21%20at%2015.45.34.png?alt=media&amp;token=ddee66a8-f791-4b43-9bfc-549982eea35e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FxCxMZlXIaerP3DHyjiFt%2FScreenshot%202023-11-23%20at%2001.25.51.png?alt=media&amp;token=1893b5d3-cc06-4738-826b-452ad0b11f37" alt=""><figcaption></figcaption></figure>

* Change the Owner **Username** to the match the target org.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FOg6j7GmhOWYt3uAvwmmL%2FScreenshot%202023-11-23%20at%2014.53.04.png?alt=media&amp;token=9557f0fb-7acc-41cf-8f06-313f82e403c7" alt=""><figcaption></figcaption></figure>

* Open the the **Contacts** User Grid using **Visual Studio Code**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FNWPXeseOxFQwP56yzyOE%2FScreenshot%202023-11-21%20at%2015.45.02.png?alt=media&amp;token=3ce513e6-d6f3-4d3c-987b-7f46e16e11c9" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FGoOkgE61SXVZ24ggAsnX%2FScreenshot%202023-11-23%20at%2001.31.11.png?alt=media&amp;token=404fb0e1-7ce8-4700-8c47-7f4e754f8f4e" alt=""><figcaption></figcaption></figure>

* Change the Owner **Username** to the match the target org.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fkn8iV1Hp4pDxKSeFdAZX%2FScreenshot%202023-11-21%20at%2016.10.32.png?alt=media&amp;token=f2ff25f3-0bcb-4f75-81c1-14ef39843d27" alt=""><figcaption></figcaption></figure>

#### User Grids Import

* Moving to the target org (Demo 13 in our example).
* Import the **Accounts** and **Contacts** User Grids using the **GM-Admin Cockpit**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FrJnDcwroAvfWTXCy1Fz6%2FScreenshot%202023-11-21%20at%2015.49.20.png?alt=media&amp;token=4b0440a8-a301-40d3-9424-d799f0fa00e7" alt=""><figcaption></figcaption></figure>

* First import the **Contacts** User Grid. Inline grids should be always imported first to be able to link them when parent grids are imported.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fk50SwQMknwk2CvZ8mPy5%2FScreenshot%202023-11-21%20at%2015.51.38.png?alt=media&amp;token=c5a93765-a248-4614-a950-6a728e4ddce3" alt=""><figcaption></figcaption></figure>

* Second import the Account User Grid.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FKaE7kJRZw9X6d6ptLkJA%2FScreenshot%202023-11-21%20at%2015.52.03.png?alt=media&amp;token=78b39e63-780f-481c-a437-2a7af0ff09ca" alt=""><figcaption></figcaption></figure>

### Deployment Using CLI Plugin

After completing the [SF Cli Plugin Setup](#sf-cli-plugin-setup), we can now **Export/import** the User Grids.

#### User Grids Export

* Export the User Grid Using [SF Cli Plugin](/tools/sf-cli-plugin)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FmY8xex7qIxK052qhKEn2%2FScreenshot%202023-11-23%20at%2000.05.36.png?alt=media&amp;token=839087f4-1d21-4b90-9275-537e064bcf90" alt=""><figcaption></figcaption></figure>

```
sf gmpkg usergrid export -o gmpkg-demo10 --api-version=58.0 -d "/Users/otmanetakhif/Desktop/WorkSpace/TrialForce/gridmate-demo/Downloaded" -n "Contact_nr9ma,Account_kozsu"
```

#### User Grids Import

* Change the Owner of the User Grids as explained in [Deployment Using Admin Cockpit](#deployment-using-admin-cockpit.)
* Import the **Contacts** User Grid  Using [SF Cli Plugin](/tools/sf-cli-plugin)&#x20;

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FOgevTeA2fAqYHXSgE80C%2FScreenshot%202023-11-23%20at%2011.46.37.png?alt=media&amp;token=0268761f-92a9-46b6-b8a8-1ba8368bd7d5" alt=""><figcaption></figcaption></figure>

```
sf gmpkg usergrid import -o demoOrg13 --api-version=58.0 -f "/Users/otmanetakhif/Desktop/WorkSpace/TrialForce/gridmate-demo/Downloaded/Contact_nr9ma.json"  
```

* Import the Account User Grid  Using [SF Cli Plugin](/tools/sf-cli-plugin)&#x20;

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F7a4VGeyFeyEbleP1AARd%2FScreenshot%202023-11-23%20at%2011.50.02.png?alt=media&amp;token=1b4893d2-f126-4edd-8b62-39ef3358307c" alt=""><figcaption></figcaption></figure>

```
sf gmpkg usergrid import -o demoOrg13 --api-version=58.0 -f "/Users/otmanetakhif/Desktop/WorkSpace/TrialForce/gridmate-demo/Downloaded/Account_kozsu.json"
```

## Final Result

Using either the **Admin Cockpit** or the **SF CLI Plugin** to obtain the desired results, On our target org (**Demo** **13**), locate the **Accounts** User Grid and **Contacts** Grid as an **inline component**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FJhwvDe4Zvkch194YfZws%2FScreenshot%202023-11-21%20at%2016.03.53.png?alt=media&amp;token=c3963a0d-5b38-4b13-a7d4-77110cf27dc3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F0DbWmggp59xOQ3rbY0nj%2FScreenshot%202023-11-21%20at%2016.00.22.png?alt=media&amp;token=f234e028-938a-4408-bbd6-09d66d401af3" alt=""><figcaption></figcaption></figure>


# User Grid - Custom Action

## **Overview**

GridMate allows users to interact with and manipulate data by adding custom actions to the GM User Grid component.

{% hint style="info" %}
To set the **JSON** configuration of the action, please refer to [Grid - Mass/Record Actions](/advanced-guides/actions-library) and [Grid - Custom Action](/advanced-guides/grid-custom-action) articles.
{% endhint %}

## Custom Action Setup

In this guide, we walk through an example of setting up the call flow action.

1. Click the gear icon in the top right corner, select **Setup**, then use the left-hand **Quick Find** search bar to type **Custom Metadata Types**.
2. Click **Manage Records** on the **grid** **action**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FHoRhxBlOhigeV4A9zBbT%2FScreenshot%202026-01-09%20at%2015.20.01.png?alt=media&amp;token=6cdaf301-e008-4bd8-acff-9f735a5aa582" alt=""><figcaption></figcaption></figure>

3. Click **New** to create a new custom action.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fl9QxdYLXT5YsWudGYnuR%2FScreenshot%202026-01-09%20at%2015.20.19.png?alt=media&amp;token=e9164e7e-669a-4712-98a1-0831ffb61e99" alt=""><figcaption></figcaption></figure>

4. After configuring the action, click **Save**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F2FZPTjbJqs9aCl5IW68s%2FScreenshot%202026-01-09%20at%2018.04.26.png?alt=media&amp;token=f25d6ba6-a23d-4af4-aae6-1ed739acdddb" alt=""><figcaption></figcaption></figure>

Below is an example of the configuration used for the **mass convert** call flow **action**.

```json
{
    "label": "Mass Convert",
    "name": "MassConvert",
    "component": "gmpkg:DataGridCallFlowComponent",
    "attributes": {
        "flowName": "GM_Mass_Lead_Convert",
        "idListParam": "idList",
        "itemListParam": "itemList",
        "autolaunched": false,
        "successMessage": "Leads converted successfully"
    }
}
```


# Pivot Grid - Advanced Settings

## Custom Action

We’ve introduced **custom action support for Pivot Grids**, allowing administrators to configure both **global actions** and **mass actions** directly within pivot views.

This enables users to trigger Salesforce **Flows** or **custom actions** without leaving the grid.

#### Flow – Apply Discount %

Below is an example of the **Apply Discount %** Screen Flow used in this demo.

The Flow includes:

* A **Discount Screen**, where the user enters the discount percentage
* An **Update Records** step, which applies the discount to the selected records

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fetm8J5ZI1UvMjZmI7W6a%2FScreenshot%202026-02-12%20at%2015.33.09.png?alt=media&amp;token=75b75017-4acd-477e-aba6-42619f5c4233" alt=""><figcaption></figcaption></figure>

#### Action Configuration

Below is a sample configuration used in this demo:

```json
[
    {
        "label": "Apply Discount %",
        "name": "Apply_Discount",
        "component": "gmpkg:DataGridCallFlowComponent",
        "attributes": {
            "flowName": "Apply_Discount",
            "idListParam": "idList",
            "autolaunched": false
        }
    }
]
```

Below is a step-by-step tutorial on how to configure these actions 👇

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

## Second X Column

We’ve introduced support for **secondary X-axis columns** in Pivot Grids, enabling more advanced multi-dimensional analysis through hierarchical grouping.

In this advanced guide, we’ll cover:

* Configuring **two X-axis columns** to enable multi-level grouping
* Using **intermediate aggregations** to display summaries between grouped levels
* Hiding the **Grand Total** to control overall aggregation visibility
* Enabling **X-axis header groups** to improve structural clarity

Below is a step-by-step tutorial demonstrating how to configure these options 👇

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

## **Formulas**

Ever wished your grid could do the math for you? With PivotGrid Formulas, it can. Whether you're tracking margins, calculating totals, or applying logic on the fly you define the expression, GridMate delivers the result, right inside your grid. No code, no complex configurations, just pure flexibility at your fingertips.

Below is a step-by-step tutorial on how to configure PivotGrid Formulas 👇

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


# Map List - Search Around

GridMate's **Search Around** is a smart and intuitive feature that lets you explore any location anywhere on the map and discover the configured point of interest within a given radius.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FGOFFO3X3w99duqkl17Q4%2FScreenshot%202025-06-13%20at%2015.09.34.png?alt=media&#x26;token=6b394ab1-8dda-455d-9a11-b134d383752b" alt=""><figcaption></figcaption></figure>

Below is an example of the **Search Around** configuration used on the video below👇.

```coffeescript
{
    "unit": "km",
    "distance": "500",
    "autoComplete": {
        "autoCompleteHandler": "GeoApifyAutoCompleteHandler"
    }
}
```

{% hint style="success" %}
Use `"unit": "mi"` to use miles instead of kilometers.
{% endhint %}

## Slider range

The distance slider runs from `minDistance` to `distance` in `stepDistance` increments.

<table><thead><tr><th width="260.8194580078125">Key</th><th width="203.861083984375">Default</th><th>Description</th></tr></thead><tbody><tr><td><code>distance</code></td><td>—</td><td>Maximum distance (slider end)</td></tr><tr><td><code>minDistance</code></td><td><code>10</code></td><td>Minimum distance (slider start)</td></tr><tr><td><code>stepDistance</code></td><td><code>5</code></td><td>Slider increment</td></tr></tbody></table>

```json
{
    "unit": "mi",
    "distance": "100",
    "minDistance": 1,
    "stepDistance": 1,
    "autoComplete": {
        "autoCompleteHandler": "GeoApifyAutoCompleteHandler"
    }
}
```

## Target entities

`targetEntities` lists the objects the location picker can search. With a single entry, `defaultValue` centres the map on that record as soon as the component loads.

<table><thead><tr><th width="260">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>objectName</code></td><td>Object API name</td></tr><tr><td><code>objectLabel</code></td><td>Label shown in the picker</td></tr><tr><td><code>titleField</code></td><td>Field used as the marker title</td></tr><tr><td><code>subTitleField</code></td><td>Field used as the marker subtitle</td></tr><tr><td><code>iconName</code></td><td>SLDS icon, e.g. <code>standard:account</code></td></tr><tr><td><code>latitudeField</code></td><td>Geolocation latitude field</td></tr><tr><td><code>longitudeField</code></td><td>Geolocation longitude field</td></tr><tr><td><code>defaultValue</code></td><td>Record Id to centre on — accepts the placeholders below</td></tr><tr><td><code>defaultDistance</code></td><td>Initial radius when <code>defaultValue</code> is set</td></tr><tr><td><code>keyPrefix</code></td><td>Object key prefix of <code>defaultValue</code> (optional — derived from the Id when omitted)</td></tr></tbody></table>

```json
{
    "unit": "km",
    "distance": "500",
    "targetEntities": [
        {
            "objectName": "Account",
            "objectLabel": "Account",
            "titleField": "Name",
            "subTitleField": "Website",
            "iconName": "standard:account",
            "latitudeField": "BillingLatitude",
            "longitudeField": "BillingLongitude",
            "defaultValue": "$recordId",
            "defaultDistance": 50
        }
    ]
}
```

### Placeholders

<table><thead><tr><th width="260">Placeholder</th><th>Resolves to</th></tr></thead><tbody><tr><td><code>$recordId</code></td><td>Id of the host record</td></tr><tr><td><code>$record.FieldApiName</code></td><td>Value of that field on the host record (direct fields only)</td></tr></tbody></table>

Use `$record.FieldApiName` when the map lives on one object but should centre on a related record — for example a Map List on the Opportunity page centred on its Account:

```json
"defaultValue": "$record.AccountId"
```

{% hint style="info" %}
The picker derives the target object from the first three characters of the resolved Id. Set `keyPrefix` explicitly when the Id comes from a polymorphic or custom-object field.
{% endhint %}

After configuring the **Search Around** property, you're ready to begin using it. The video below provides a detailed, step-by-step tutorial on how to use the **Search Around** within a GM - Map List.👇.

{% embed url="<https://youtu.be/bCRBc2Yhess>" %}
**Search Around**
{% endembed %}


# Map List - Marker Clusters

The **Marker Clusters** groups nearby map markers into a single visual entity, enabling more effective visualizations on maps.

### Enable Marker Clusters <a href="#enable-config-checker" id="enable-config-checker"></a>

To enable the **Marker Clusters** option, edit the Lightning page in the App Builder, select the Map List and check **"Show Clusters".**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FTtfXna42BVdWVh14lBdn%2FScreenshot%202025-06-12%20at%2011.47.21.png?alt=media&amp;token=6c464baf-e0e6-4a65-9d1b-7a7a8bd08330" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Marker Clusters feature is available only for **OpenStreetMap** provider.
{% endhint %}

### Marker Clusters Setup

Once the **Show Clusters** option is enabled, Marker Clusters automatically group nearby map markers into unified visual clusters.

Below is a step by step tutorial on how to configure **Marker Clusters** 👇.

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


# File Explorer - File Connect

## Introduction

**GridMate File Connect** is a powerful integration feature that allows users to seamlessly access and interact with files stored in external systems including **Google Drive**, **Amazon S3**, **Dropbox**, **SharePoint**, and **Box**. This guide will walk you through the steps needed to configure Google Drive, Amazon S3, and SharePoint.

## **Enable Files Connect**

1. In Salesforce, go to **Setup**.
2. Search for **Files Connect** in the Quick Find box.
3. Enable **Files Connect**.
4. Save your settings.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FLpK3sdjQEnfepUnyA47o%2FScreenshot%202025-08-14%20at%2010.09.27.png?alt=media&amp;token=fb5ff291-59ae-47f1-99d3-22f4046b46db" alt=""><figcaption></figcaption></figure>

## Google Drive

### Google Auth Provider

&#x20;Create an Authentication Provider for Google Drive

1. Using the credentials of your Google App for Work admin account, log in to [https://console.cloud.google.com](https://console.cloud.google.com/).
2. In the title bar, expand **Select Project** and click **Create Project**.
3. Enter a project name and location, and click **Create**.
4. In the project dashboard, click the menu icon in the upper left, and then click **APIs & Services**.
5. In the API manager, go to the Library tab and search for <kbd>Google Drive API</kbd>.
6. In the search results, click **Google Drive API**, and then click **Enable API**.
7. In the menu on the left, click **Credentials**.
8. In the OAuth Consent Screen tab, enter a valid email address and application name, and click **Save**.
9. In the Credentials tab, click **Add credentials**, and select OAuth client ID.
10. Select Web application, and click **Create**.
11. Copy the client ID and client secret values to a text file. Use these values next, when you create an authentication provider in Salesforce.
12. In Setup, enter <kbd>Auth. Providers</kbd> in the Quick Find box, then select **Auth. Providers**.
13. Click **New**.
14. For Provider Type, select **OpenID Connect**, and then set the following options:
    * Name — Enter the name you want to appear in Salesforce.
    * URL Suffix — Enter the suffix at the end of the URL path. For example, in the path, <https://login.salesforce.com/services/authcallback/00Dx00000000001/GDrive>, the suffix is “GDrive”
    * Consumer Key — Enter the client ID you copied when creating the Google project.
    * Consumer Secret — Enter the client secret you copied when creating the Google project.
    * Authorize Endpoint URL —Enter <https://accounts.google.com/o/oauth2/auth?access\\_type=offline\\&approval\\_prompt=force>
    * Token Endpoint URL — Enter <https://accounts.google.com/o/oauth2/token>
    * Default Scopes — Enter openid email profile <https://www.googleapis.com/auth/drive>
15. Click **Save**.
16. At the bottom of the Auth. Provider detail page, copy the Callback URL entry to a text file. Use this URL when you edit the Google project next.
17. In the API Manager, in the menu on the left, click **Credentials**.
18. Click the previously created web app.
19. In the Authorized Redirect URIs section, add the Callback URL you copied when creating the authentication provider in Salesforce, and click **Save**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fimj3NciXji1gZqglkT7y%2FScreenshot%202025-08-18%20at%2017.13.34.png?alt=media&amp;token=db73c468-729d-452f-b0b4-3689e43ce68a" alt=""><figcaption></figcaption></figure>

### External Data Source&#x20;

1. From Setup, enter <kbd>External Data Sources</kbd> in the Quick Find box, then select **External Data Sources**.
2. Click **New External Data Source**. Then set the following options.<br>

   <table><thead><tr><th width="158.86566162109375">Field</th><th width="800">Description</th></tr></thead><tbody><tr><td>Label</td><td>A user-friendly name for the data source displayed in the Salesforce user interface.</td></tr><tr><td>Name</td><td>A unique identifier used to refer to this external data source definition through the API. The <strong>Name</strong> field can contain only underscores and alphanumeric characters. It must be unique, begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.</td></tr><tr><td>Type</td><td>Choose <strong>Files Connect: Google Drive</strong></td></tr><tr><td>Identity Type</td><td><p>The identity type used to authenticate to the external data source.</p><p>Select <strong>Per User</strong> to require separate credentials for each user who accesses the data source. (Administrators must enable the data source for specific permission sets and profiles. Users then enter their credentials when first accessing the data source..)</p><p>Select <strong>Named Principal</strong> to use the same set of credentials for every user who accesses the data source from Salesforce.</p></td></tr><tr><td>Authentication Protocol</td><td><p>The protocol used to access Google Drive.</p><p>Select <strong>OAuth 2.0</strong>.</p></td></tr><tr><td>Authentication Provider</td><td>Enter the <a href="https://help.salesforce.com/s/articleView?id=experience.admin_files_connect_google_auth.htm&#x26;language=en_US&#x26;type=5">Google Drive authentication provider</a>.</td></tr><tr><td>Scope</td><td>Leave blank.</td></tr><tr><td>Start Authentication Flow on Save</td><td>Select to immediately test the settings above.</td></tr></tbody></table>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FLBN1ATRWOyoVxkrxhfbU%2FScreenshot%202025-06-12%20at%2015.25.42.png?alt=media&amp;token=75e74970-7960-48a3-b00c-4cb0ed83d54c" alt=""><figcaption></figcaption></figure>

### External Credential

An **External Credential** is a secure configuration in Salesforce that defines **how authentication is handled when connecting to a remote system**, such as Google Drive or AWS.&#x20;

See how you can create yours here 👉 : [External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm\&type=5)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F2b40nlMS9WbdpZEhVjsi%2FScreenshot%202025-06-12%20at%2016.24.55.png?alt=media&amp;token=06d49b88-f0c9-4895-a91b-50991d8afe5d" alt=""><figcaption><p>External credential</p></figcaption></figure>

### Named Credential

A **Named Credential** is a secure, configurable connection in Salesforce  that defines the **external system’s endpoint URL and authentication settings** in one logical unit.&#x20;

See how you can create yours here 👉 : [Named credential ](https://help.salesforce.com/s/articleView?language=en_US\&id=xcloud.nc_create_edit_named_credential.htm\&type=5)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F0vdT0ddPxfsV6n1xyYjf%2FScreenshot%202025-06-12%20at%2016.22.46.png?alt=media&amp;token=1520e143-4bd7-4b31-81a2-ca6268242ada" alt=""><figcaption><p>Named credential</p></figcaption></figure>

{% hint style="success" %}
Before creating a named credential, you must create an external credential to link it to. See [Create or Edit an External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm\&language=en_US\&type=5).
{% endhint %}

{% hint style="warning" %}
Make sure to add gmpkg in 'Allowed Namespaces for Callouts'
{% endhint %}

### Permission Set

To enable the **File Connect** feature, create a new Permission Set or update an existing one following these steps:

* Create a Permission Set (File Connect User) to grant access to Google Drive credentials
* Select **Gdrive** External Credential Principal Access,
* Save your changes.

Follow the steps below to give access for a specific user:

* Go to advanced user details,
* Click on permission set assignments,
* Select **File Connect User** permission set,

You are ready to start using the **GridMate's File Connect** and enjoy all its benefits.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FqGPwSy9n5KxTs7PACNNF%2FScreenshot%202025-08-14%20at%2010.13.44.png?alt=media&amp;token=c4cc110c-84fa-44a7-b5f7-67636144b41b" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FEtPVMO5B7fNvzmNjXhr5%2FScreenshot%202025-06-12%20at%2015.51.26.png?alt=media&amp;token=58063fe8-5170-47b6-aee9-c14a162b4787" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2Fd6bEn2ySLSQC94bNAs2c%2FScreenshot%202025-06-12%20at%2015.44.45.png?alt=media&amp;token=97bd4e98-2969-4d19-a3f0-8cfaf512260a" alt=""><figcaption></figcaption></figure>

### **Connect Config Metadata Type**

GM - File Explorer uses a Custom Metadata Type (Connect Config) as a single entry to interact with cloud storage. This configuration element contains:

* Configuration Label,
* Configuration Name,
* External Data Source Id,
* External Data Source Name,
* External Data Source Label,
* Named Credentials :  We are leveraging named credentials to align with security best practices.
* Options: options is a JSON string that contains any specific configuration for the targeted cloud storage.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FqLynpmstJfaBZIRTi1fO%2FScreenshot%202025-08-19%20at%2010.48.46.png?alt=media&amp;token=b75f6b40-130c-44bb-b6ea-b4ff2c085d38" alt=""><figcaption></figcaption></figure>

To read more about the Custom Metadata Types  👉: [Custom Metadata Types](https://help.salesforce.com/s/articleView?id=sf.custommetadatatypes_overview.htm)

### Google Drive **Action**

1. Edit the page in the Lightning App Builder.
2. Choose the **File Explorer** Component you are working on.
3. Paste the configuration below into the **Actions** property.

```coffeescript
[
     {
        "label": "Add from GDrive",
        "name": "Add_from_GDrive",
        "component": "gmpkg:gdriveFilePickerLWC",
        "attributes": {
            "size": "small",
            "storageCfg": "gdrive"
        }
    }
]
```

{% hint style="info" %}
**storageCfg** property is the name of the Connect Config record described above.
{% endhint %}

### Google Drive Demo

Below is a quick demo on how to use the **File Connect - Google Drive**👇.

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

## Amazon S3

### **External Credential**

1. In Salesforce Setup, search for **External Credentials**.
2. Click **New**.
3. Enter:
   * **Label**: AWS&#x20;
   * **Name**: AWS
   * **Authentication Protocol**: AWS Signature Version 4
   * **Region**: us-east-1
   * **Service:** s3
   * **AWS Account ID**: You can find it in the AWS console under your account settings (12-digit number).
4. Click **Save**.
5. Under **Principals**, click **New**.
6. Choose **Named Principal**.
7. Enter:
   * **AWS Access Key ID** in the **Access Key** field.
   * **AWS Secret Access Key** in the **Access Secret** field.
8. Click **Save**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FGj9ocQzhWYN9iiIZ2ruX%2FScreenshot%202025-08-13%20at%2023.35.28.png?alt=media&amp;token=9cf56df9-7f7a-4473-9527-71af1e786e2d" alt=""><figcaption></figcaption></figure>

See how you can create yours here 👉: [External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm\&type=5)

### **Named Credential**

1. Go to **Setup** and search for **Named Credentials**  click **New**.
2. Fill in:
   * **Label**: AWS S3
   * **Name**: AWS\_S3
   * **URL:** Your specific S3 bucket endpoint, e.g: `https://mybucket.s3.us-east-1.amazonaws.com`
   * **External Credential**: Choose the External Credential you created earlier.
   * **Allowed Namespaces for Callouts**: gmpkg.
3. Save.

See how you can create yours here 👉: [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_named_credential.htm\&type=5)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FESK1XyLvPSzuCY8FWTh8%2FScreenshot%202025-08-14%20at%2021.40.13.png?alt=media&amp;token=28ccf129-d371-4b5a-8823-4bc164516773" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
Before creating a named credential, you must create an external credential to link it to. See [Create or Edit an External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm\&language=en_US\&type=5).
{% endhint %}

### **External Data Source**

1. Go to **Setup** and search for **External Data Sources** and click **New**.
2. Fill in:
   * **External Data Source**: `AWS S3`
   * **Name:**&#x41;WS\_S3
   * **Type**: `Simple URL`&#x20;
   * **URL**: `https://s3.amazonaws.com/<bucket-name>`
3. Save.

&#x20;See how you can create yours here 👉: [External Data Source](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_awssig4_ext_cred.htm\&type=5)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FQMYWTnH3LU9e2HkCLial%2FScreenshot%202025-08-14%20at%2010.06.39.png?alt=media&amp;token=04e21250-50c3-40ca-9f79-b5091f96946a" alt=""><figcaption></figcaption></figure>

### **Connect Config Metadata Type**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FlZ5ycCVjvzYOCEwnoIb8%2FScreenshot%202025-08-13%20at%2022.31.56.png?alt=media&amp;token=728e48f9-04ec-44e1-9b0e-ddeaad950d55" alt=""><figcaption></figcaption></figure>

The options for S3 should contain the Access Key, Secret Key, Bucket Name, and region.

```json
{
    "accessKey": "*******",
    "secretKey": "*************************",
    "bucket": "<bucket-name>",
    "region": "<aws-region>"
}
```

To read more about the Custom Metadata Types  👉: [Custom Metadata Types](https://help.salesforce.com/s/articleView?id=sf.custommetadatatypes_overview.htm)

### Permission Set

See [Permission Set](#permission-set).

### S3 **Action**

1. Edit the page in the Lightning App Builder.
2. Choose the **File Explorer** Component you are working on.
3. Paste the configuration below into the **Actions** property.

```coffeescript
[
    {
        "label": "Add from S3",
        "name": "Add_from_S3",
        "component": "gmpkg:s3FilePickerLWC",
        "attributes": {
            "size": "small",
            "storageCfg": "AWS_S3"
        }
    }
]
```

{% hint style="info" %}
**storageCfg** property is the name of the Connect Config record described above.
{% endhint %}

### S3 Demo

Below is a quick demo on how to use the **File Connect -**  S3👇.

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

## Sharepoint

### Sharepoint Auth Provider&#x20;

Before setting up Salesforce, ensure the authentication provider includes a redirect URI to register your app.

1. In Setup, enter <kbd>Auth. Providers</kbd> in the Quick Find box, then select **Auth. Providers**.
2. Click **New**.
3. For Provider Type, select **OpenID Connect**, and then set the following options.
   * Name — Enter the name you want to appear in Salesforce.
   * URL Suffix — Enter a suffix you want to appear at the end of the URL path. By default, the suffix reflects the Name entry.
   * Consumer Key — Enter a placeholder value.
   * Consumer Secret — Enter a placeholder value.
   * Authorize Endpoint URL — Enter a placeholder that begins with *https*.
   * Token Endpoint URL — Enter a placeholder that begins with *https*.
   * Default Scopes — <https://graph.microsoft.com/.default>.
4. Click **Save**. Then, at the bottom of the Auth. Provider detail page, copy the Callback URL entry to a text file.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FCXmFju5dp4GiXqRepcCa%2FScreenshot%202025-08-14%20at%2017.06.35.png?alt=media&amp;token=80fe5f48-b409-4a39-afe2-230fd7d254a0" alt=""><figcaption></figcaption></figure>

See how you can create yours here 👉: [Auth Provider](https://help.salesforce.com/s/articleView?id=experience.admin_files_connect_sp_online_auth.htm\&type=5)

### **External Data Sources**

Go to **Setup** and search for **External Data Sources** and click **New**.

1. Fill in:
   * **External Data Source**: sharepoint
   * **Name:** sharepoint
   * **Type**: Files Connect: Microsoft SharePoint Online&#x20;
   * **URL**: Enter a placeholder value
   * **Authentication Protocol**: OAuth 2.0
   * **Authentication Provider**: Sharepoint
2. Save.

&#x20;See how you can create yours here 👉: [External Data Source](https://help.salesforce.com/s/articleView?id=experience.admin_files_connect_sp_online_auth_office365.htm\&type=5)

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F4t78YudOhLUS5TYL4KHu%2FScreenshot%202025-08-14%20at%2018.04.06.png?alt=media&amp;token=a2ed602c-40c9-4ba8-8d4f-3404e2637619" alt=""><figcaption></figcaption></figure>

### **External Credential**

1. In Salesforce Setup, search for **External Credentials**.
2. Click **New**.
3. **Label**: SharePoint.
4. Enter:
   * **Name**: Sharepoint
   * **Authentication Protocol**: OAuth 2.0
   * **Authentication Provider**: SharePoint
5. Click **Save**.
6. Under **Principals**, click **New**.
7. Choose **Named Principal**.
   * **Parameter Name:** Sharepoint User
   * **Identity Type:** Per User Principal
8. Click **Save**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FDk1fHaSFKE5PDCeoGwKf%2FScreenshot%202025-08-14%20at%2018.10.45.png?alt=media&amp;token=3ac321fe-a084-4e5e-aa30-a469df73909d" alt=""><figcaption></figcaption></figure>

See how you can create yours here 👉 : [External Credential](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_external_credential.htm\&type=5)

### **Named Credential**

1. Go to **Setup** and search for **Named Credentials**  click **New**.
2. Fill in:
   * **Label**: Sharepoint API
   * **Name**: Sharepoint\_API
   * **URL:** <https://graph.microsoft.com>
   * **External Credential**: Choose the External Credential you created earlier.
   * **Allowed Namespaces for Callouts**: gmpkg.
3. Save.

See how you can create yours here 👉: [Named Credentials](https://help.salesforce.com/s/articleView?id=xcloud.nc_create_edit_named_credential.htm\&type=5)

### Permission Set

See [Permission Set](#permission-set).

### **Connect Config Metadata Type**

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2FIvGfDVyKyEUm7aZEadsf%2FScreenshot%202025-08-14%20at%2018.28.38.png?alt=media&amp;token=0e1f8bff-aaa8-47f5-a867-d1e3b1ecb480" alt=""><figcaption></figcaption></figure>

### **Point to a Specific SharePoint Site**

In order to point the Salesforce integration to a specific SharePoint site and document library, the Site ID and Drive ID must be retrieved from the SharePoint tenant using the Microsoft Graph API.

Open **Graph Explorer**: `https://developer.microsoft.com/en-us/graph/graph-explorer`

***

**Step 1 — Get the Site ID**

```
GET https://graph.microsoft.com/v1.0/sites/{tenant}.sharepoint.com:/sites/{site-name}
```

Copy the `id` field from the response.

***

**Step 2 — Get the Drive ID**

```
GET https://graph.microsoft.com/v1.0/sites/{site_id}/drives
```

Copy the `id` of the target document library (usually `Documents`).

***

**Step 3 — Get the Root Folder ID**

```
GET https://graph.microsoft.com/v1.0/drives/{driveId}/root
```

Copy the `id` field from the response.

***

**The retrieved values are then used to build the following configuration:**

json

```json
{
    "rootPath": "${drive_id}://${folder_id}"

}
```

This payload is stored in Salesforce **Custom Metadata Types** to complete the integration.

To read more about the Custom Metadata Types  👉: [Custom Metadata Types](https://help.salesforce.com/s/articleView?id=sf.custommetadatatypes_overview.htm)

### **Sharepoint Action**

1. Edit the page in the Lightning App Builder.
2. Choose the **File Explorer** Component you are working on.
3. Paste the configuration below into the **Actions** property.

```coffeescript
[
    {
        "label": "Add from Sharepoint",
        "name": "Add_from_Sharepoint",
        "component": "gmpkg:sharepointFilePickerLWC",
        "attributes": {
            "size": "small",
            "storageCfg": "sharepoint"
        }
    }
]
```

{% hint style="info" %}
**storageCfg** property is the name of the Connect Config record described above.
{% endhint %}

### Sharepoint Demo

Below is a quick demo on how to use the **File Connect -**  Sharepoint👇.

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

## Attach Folder

The **Attach Folder** capability in GridMate’s File Explorer enables users to associate external cloud storage folders with Salesforce records, providing direct visibility into external files without duplicating or storing them inside Salesforce.

Below is a step-by-step tutorial on how to use and use the **Attach Folder** feature 👇.

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


# Enhanced Record Layout

## Introduction

GridMate ships three record layout components in the App Builder palette:

* **GM - Record Layout** — the original Aura component. This component is able to display any object supported by UI-API.
* **GM - Record Layout (LWC)** — the Aura-wrapped Lightning Web Component. This component doesn't require UI-API.&#x20;
* **GM - Enhanced Record Layout** — a native Lightning Web Component. Drop it on a record, app, home or Experience Cloud page, on desktop and on phone, no wrapper needed. This component doesn't require UI-API.

All three read the same **Record Layout** JSON: sections, rows, columns, visibility, read-only and coloring rules. See [Record Layout (LWC)](/product-tour/record-layout-lwc) for the full description of that JSON. This guide covers what **GM - Enhanced Record Layout** adds on top of it:

* **Layout Actions** — buttons in the header that reshape the layout at runtime.
* **Validation Rules** — warnings and errors evaluated while the user types, or on save.
* **Apex Validation Action** — a button that runs your own Apex validator against the unsaved record.
* **Layout Config** — load the whole configuration from a custom metadata record and reuse it on every page.

The properties of the component are listed in [GM - Enhanced Record Layout](/package-reference/components-library/gm-enhanced-record-layout).

## Layout Actions

Set the **Layout Actions** property to a JSON array. Each action is rendered as a button in the header of the component. A layout action is a toggle: click it to apply a set of changes to the layout, click it again to revert them.

The example below adds two buttons to an Account layout: **Hide Empty** hides the fields that have no value, **Highlight Required** colors the required fields.

```json
[
    {
        "name": "hideEmpty",
        "label": "Hide Empty",
        "icon": "utility:hide",
        "mode": "view",
        "command": {
            "id": "hide-empty",
            "target": { "formula": "empty" },
            "changes": { "hidden": true }
        }
    },
    {
        "name": "highlightRequired",
        "label": "Highlight Required",
        "icon": "utility:warning",
        "command": {
            "id": "highlight-required",
            "target": { "formula": "required" },
            "changes": { "backgroundColor": "var(--slds-g-color-error-base-80)" }
        }
    }
]
```

* `mode` — `view` or `edit`. Omit it to show the button in both modes.
* `command.target` — the elements to change: `{ "fields": ["Phone", "Fax"] }` for a list of fields, `{ "type": "section", "sections": ["addressInformation"] }` for a list of sections, or `{ "formula": "..." }` for a [Javascript Formula](/package-reference/javascript-formulas) evaluated against every field. The formula can use the record fields as well as `value`, `empty`, `required` and `updateable`.
* `command.changes` — the changes to apply: `hidden`, `readOnly`, `highlighted`, `backgroundColor` or `style`.

{% hint style="info" %}
An action without a `command` is dispatched to the parent component as a `layoutaction` event, so a custom Lightning Web Component wrapping the layout can handle it.
{% endhint %}

## Validate before you save

Add a `validate` array to any field of the **Record Layout** JSON. Each rule has an expression, written with the same syntax as `visibility` and `readOnly`, a message and a type:

* `"type": "warning"` — while the expression is true, an amber note is displayed under the field. The user can still save.
* `"type": "error"` — while the expression is true, a red note is displayed under the field and the field is required. The record cannot be saved until the field is filled in.

Section headers display the number of required fields of the section.

```json
{
    "apiName": "Phone",
    "validate": [
        {
            "exp": { "AccountSource": { "operator": "=", "value": "Web" } },
            "message": "Web accounts must have a phone number.",
            "type": "error"
        }
    ]
}
```

By default the rules are evaluated immediately, as the user types. Set `rulesMode` at the top level of the **Record Layout** JSON to evaluate them when the user clicks **Save** instead:

```json
{
    "density": "comfy",
    "rulesMode": "onsave",
    "sections": [...]
}
```

## Apex validation action

When the validation needs data that is not on the record (related records, an external system, a complex business rule), add a layout action of type `apex`. The button sends the record, with its unsaved values, to your Apex class and displays the errors it returns.

### Layout action

```json
{
    "name": "validateAccount",
    "label": "Validate",
    "icon": "utility:check",
    "type": "apex",
    "mode": "edit",
    "apexClass": "AccountLayoutValidator",
    "params": { "strict": true },
    "successMessage": "Account looks good"
}
```

### Apex class

The class implements the `Callable` interface. GridMate calls `call('validate', args)` where `args` holds the `record` (the record with the values currently displayed), the `objectName` and the `params` of the action. The method returns a list of `gmpkg.SaveHookManager.SaveHookResult`:

* A result with `fields` is displayed as an error under each of these fields.
* A result without `fields` is displayed as a record-level error at the top of the layout.
* An empty list displays the `successMessage` toast.

```java
global with sharing class AccountLayoutValidator implements Callable {
    global Object call(String action, Map<String, Object> args) {
        Account acc = (Account) args.get('record');
        Map<String, Object> params = (Map<String, Object>) args.get('params');
        Boolean strict = params != null && params.get('strict') == true;

        List<gmpkg.SaveHookManager.SaveHookResult> results = new List<gmpkg.SaveHookManager.SaveHookResult>();

        // Field-level error: displayed under the Phone field
        if (acc.AccountSource == 'Web' && String.isBlank(acc.Phone)) {
            results.add(
                new gmpkg.SaveHookManager.SaveHookResult(
                    'FIELD_CUSTOM_VALIDATION_EXCEPTION',
                    'Web accounts must have a phone number.',
                    new List<String>{ 'Phone' }
                )
            );
        }

        // Record-level error: displayed at the top of the layout
        if (strict && acc.Industry == 'Banking' && String.isBlank(acc.Description)) {
            results.add(
                new gmpkg.SaveHookManager.SaveHookResult(
                    'CUSTOM_VALIDATION_EXCEPTION',
                    'Banking accounts require a description before they can be approved.'
                )
            );
        }

        return results;
    }
}
```

{% hint style="info" %}
The validation action is advisory: **Save** does not run the validator again. To enforce the rules on save, register the same class as a save hook. See [Save Hook Framework](/advanced-guides/save-hook-framework).
{% endhint %}

## Configure once, reuse everywhere

Instead of pasting the JSON in every page, store the configuration in a **Record Layout** custom metadata record and reference it from the component.

{% stepper %}
{% step %}

### Create the Record Layout record

In **Setup**, open **Custom Metadata Types**, click **Manage Records** next to **Record Layout** and click **New**.

<table><thead><tr><th width="253.546875">Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Sobject</strong></td><td>The object of the record to display.</td></tr><tr><td><strong>Record Id Field</strong></td><td>The field of the page record holding the Id of the record to display. <code>Id</code> when the component is placed on the record itself.</td></tr><tr><td><strong>Record Layout</strong></td><td>The <strong>Record Layout</strong> JSON.</td></tr><tr><td><strong>Layout Actions</strong></td><td>The <strong>Layout Actions</strong> JSON.</td></tr><tr><td><strong>Record Actions</strong></td><td>The <strong>Record Actions</strong> JSON.</td></tr><tr><td><strong>Button Actions</strong></td><td>Display the record actions as buttons instead of icons.</td></tr><tr><td><strong>Visible Actions</strong></td><td>Number of record actions displayed before the overflow menu.</td></tr><tr><td><strong>Show Border</strong></td><td>Display the card border.</td></tr></tbody></table>
{% endstep %}

{% step %}

### Reference it from the component

In the App Builder, set the **Layout Config** property of **GM - Enhanced Record Layout** to the **Record Layout Name** of the record. Leave the other properties empty: the values of the metadata record replace the properties set in the App Builder, including the empty ones.
{% endstep %}
{% endstepper %}


# Save Hook Framework

{% hint style="warning" %}
This is **not a Salesforce trigger** it works **only within the GridMate component**.
{% endhint %}

Gridmate **Save Hook**  is a customizable Apex extension point that allows you to inject logic before or after Salesforce record save operations (Insert or Update) while maintaining **synchronous** and **asynchronous** processing flows with **external systems**.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F0CeqH4v8TBv8zXebzY1Z%2FScreenshot%202025-10-29%20at%2015.30.20.png?alt=media&amp;token=7e2d99d5-2bf9-456b-a11c-87f0c8b0c653" alt=""><figcaption></figcaption></figure>

## Rules for Save Hook and Callouts

### **1. Key Principles**

* For every **N records** processed, you must return exactly **N `SaveHookResult` objects** one per record.
* The **order of results** must exactly match the **order of input records**.
* The framework uses **positional mapping** *(Record n → Result n)* to correctly associate results, ensuring accurate error reporting and user feedback.

{% hint style="info" %}
Maintaining this one-to-one correspondence is essential for reliable Save Hook processing.
{% endhint %}

### **2. Callout Execution Rules**

**Synchronous callouts** are allowed **only** in the following contexts:

* `beforeInsert`
* `beforeUpdate`

At these points, the transaction has not yet been committed, making synchronous communication with external systems safe.

**Synchronous callouts are prohibited** in:

* `afterInsert`
* `afterUpdate`

Use asynchronous methods instead:

* `@future(callout=true)` for simple, deferred operations.
* **Queueable Apex jobs** (with callouts enabled) for more complex or queued background processing.

{% hint style="info" %}
This ensures compliance with Salesforce callout rules and maintains transaction safety.
{% endhint %}

### **3. Before Events - Validation Stage**

Use the **`beforeInsert`** and **`beforeUpdate`** events for **record validation** prior to saving data to Salesforce.

When a validation fails, return a **`SaveHookResult`** configured as follows:

* `isSuccess = true` marks the record as valid.
* `isSuccess = false` marks the record as invalid.
* `statusCode` *(optional)* provides an error code or identifier.
* `message`  gives a clear explanation of the validation issue.

For standard patterns and reusable logic, refer to the **`SaveHookManager`** managed class.

### **4. After Events - Post-Processing Stage**

Use **`afterInsert`** and **`afterUpdate`** for **post-commit operations** such as:

* Synchronizing with external systems.
* Performing data enrichment.
* Triggering asynchronous workflows or notifications.

All logic in this stage should be **non-blocking** and **asynchronous**, ensuring smooth execution without affecting the main transaction.

{% hint style="warning" %}
Never perform direct (synchronous) callouts in `afterInsert` or `afterUpdate`, as this will trigger **Salesforce transaction errors** and compromise data integrity.
{% endhint %}

## Save Hook Setup

### 1. Framework instantiation&#x20;

Here’s an example of the **Save Hook apex Code**:&#x20;

To create a custom Save Hook, you must implement the **`gmpkg.SaveHookManager.ISaveHook`** global interface provided by the GridMate framework.

{% hint style="info" %}
The list of objects passed to the Save Hook method acts as a **direct reference** any updates made to the records in this list will automatically **modify the values that the component commits** to Salesforce.&#x20;
{% endhint %}

<pre class="language-java"><code class="lang-java">global class QuoteSaveHook implements gmpkg.SaveHookManager.ISaveHook {
<strong>    global static List&#x3C;gmpkg.SaveHookManager.SaveHookResult> call(String action, List&#x3C;Quote> quotes) {
</strong>           List&#x3C;gmpkg.SaveHookManager.SaveHookResult> res = new List&#x3C;gmpkg.SaveHookManager.SaveHookResult>();
    
           switch on action {
               when 'beforeUpdate' { // Synchronous call
                    ... create HTTP request ...
                    HttpResponse response = new Http().send(req);
                    List&#x3C;Object> apiResults = (List&#x3C;Object>) JSON.deserializeUntyped(response.getBody()); 
                    
                    for (Integer i = 0; i &#x3C; quotes.size(); i++) {
                        Quote newQuote = quotes[i];
                        
                        /* 
                        this is the API result 
                        for example if I receive :
                        {
                            "statusCode" : "400",
                            "messageAPI" : "error",
                            "success" : false,
                            "relatedFields" : ["Test__c"]
                        }
                        i will map this fields with the SaveHookResult
                        */        
                        Map&#x3C;String, Object> apiResult = (Map&#x3C;String, Object>) apiResults[i];
                        Booloean success = (Boolean) apiResult.get('success');
                        String statusCode = (String) apiResult.get('statusCode');
                        String message = (String)  apiResult.get('messageAPI');
                        List&#x3C;String> fields = (List&#x3C;String>) apiResult.get('relatedFields');
    
                        if (success == false) {
                            gmpkg.SaveHookManager.SaveHookResult errorResult = new gmpkg.SaveHookManager.SaveHookResult(success, statusCode, message, fields);
                            res.add(errorResult);
                        } else {
                            gmpkg.SaveHookManager.SaveHookResult successResult = new gmpkg.SaveHookManager.SaveHookResult();
                            res.add(successResult);
                    }
                }
            }
        }
        return res;
    }
}
</code></pre>

### 2. Save Hook Activation

1. Go to Setup.
2. Navigate to Custom Metadata Types.
3. Find Hook Config&#x20;
4. &#x20;Click Manage Records.
5. Create a new record
6. Fill in the required fields:
   1. Label: **A descriptive name (e.g., Quote SaveHook before Update).**
   2. SObject: **The Salesforce object (e.g., Quote).**
   3. Hook Config Name: **Unique developer name for the config (e.g., QuoteSaveHook).**
   4. Apex Class: **The class implementing the hook business logic (e.g., QuoteSaveHook).**
   5. Context: **The trigger context (e.g., beforeUpdate, beforeInsert, etc.).**
   6. Execution Order: **A number that defines in which sequence hooks run (lower numbers run first).**
   7. Is Active: **Set to true to activate the hook.**
7. Save the record.&#x20;

{% hint style="info" %}
With this setup, Salesforce will:

* Run all hooks for the given SObject and context.
* Respect the Execution Order (1 runs before 2, etc.).
  {% endhint %}


# Salesforce Classic Setup

GridMate can be deployed on Salesforce Classic. Only RelatedList and ListView grids are supported. To run GridMate on Classic, we use Salesforce [Lightning out](https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lightning_out).&#x20;

## Lightning application setup

To run the Lightning out on Classic, a lightning app **VFListViewDataGridApp** should be created with the markup below.

```markup
<aura:application extends="ltng:outApp" >
    <aura:dependency resource="gmpkg:VFListViewDataGridComponent"/>
    <aura:dependency resource="markup://force:showToast" type="EVENT"/>
    <aura:dependency resource="markup://force:refreshView" type="EVENT"/>
</aura:application>
```

## Visualforce page setup

Create a Visualforce page to wrap GridMate component using the Lightning out technology.

```markup
<apex:page controller="VFListViewDataGridController"
           showHeader="true"            
           sidebar="false">
    <apex:includeLightning />
    
    <div id="workbench" />
    
    <script>
    $Lightning.use("{!lightningApp}", function() {        
        //prepare attributes
        let attributes = JSON.parse('{!attributes}' || '{}');
        attributes = Object.assign(attributes, {
            "aura:id": "listViewGrid",
            "relatedObjectName" : "{!relatedObjectName}",
            "listViewName" : "{!listViewName}"
            "canFilter": true            
        });
        
        //create the data grid
        $Lightning.createComponent("gmpkg:VFListViewDataGridComponent",
                                   attributes,
                                   "workbench",
                                   function(component) {
                                       $A.eventService.addHandler({
                                           event: 'force:showToast',
                                           handler: function(event) { 
                                               let toast = component.find("toast");
                                               toast.showToast(event.getParams());
                                           }
                                       });
                                   });
    });        
    </script>
</apex:page>
```

We have also to implement the Visualforce controller with its unit test class

```java
/***
* @author Hicham El Mansouri@GridMate
* @date 12/2019
* @description DataGrid controller class for VFListViewDataGrid.
*/
public with sharing class VFListViewDataGridController {
    private final String lightningApp;
    private final String relatedObjectName;
    private final String listViewName;
    private final String attributes;
    
    public VFListViewDataGridController() {
        lightningApp = ApexPages.currentPage().getParameters().get('c__lightningApp');
        relatedObjectName = ApexPages.currentPage().getParameters().get('c__object');
        attributes = ApexPages.currentPage().getParameters().get('c__attributes');
        
        listViewName = getLastUsedListView(relatedObjectName);
    }

    private static String getLastUsedListView(String objName)
    {
        try{
            RecentlyViewed recentItem = [Select Id, Name From RecentlyViewed  
                                         Where Type='ListView' Order by LastViewedDate Desc Limit 1];
            
            ListView listView = [Select Id, Name, DeveloperName From ListView 
                                 Where SobjectType=:objName And Name=:recentItem.Name Limit 1];
            
            return listView.DeveloperName;
        }        
        catch(Exception ex){
            System.debug(ex.getStackTraceString());
            return null;
        }           
    }
    
    public String getRelatedObjectName() {
        return relatedObjectName;
    }
    
    public String getAttributes() {
        return attributes;
    }
    
    public String getListViewName() {
        return listViewName;
    }       
    
    public String getLightningApp() {
        return lightningApp;
    } 
}
```

```java
/***
* @author Hicham El Mansouri@GridMate
* @date 12/2019
* @description DataGrid controller class for VFListViewDataGrid.
*/
@isTest
public class VFListViewDataGridControllerTest {
    static testMethod void testGetLastUsedListView(){
        ApexPages.currentPage().getParameters().put('c__lightningApp', 'c:VFListViewDataGridApp');
        ApexPages.currentPage().getParameters().put('c__object', 'Account');
        ApexPages.currentPage().getParameters().put('c__attributes', '%7B"canCreate"%3A+true%2C"canClone"%3A+true%7D');
        
        VFListViewDataGridController c = new VFListViewDataGridController();
        
        String lastUsed = c.getListViewName();
        if(lastUsed == null){System.assert(lastUsed == null);}
        else{ System.assert(lastUsed != null);}
        
        String relatedObjectName = c.getRelatedObjectName();
        System.assert(relatedObjectName != null);
        
        String attributes = c.getAttributes();
        System.assert(attributes != null);
        
        String lightningApp = c.getLightningApp();
        System.assert(lightningApp != null);
    }
}
```

## Mass Edit button setup

To trigger the mass edit Visualforce page, we have to configure a link on the targeted object.

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MFFC0b29nEm7BzPxo6U%2F-MFFI7PaKOEbmyK7lCLv%2FScreenshot%202020-08-21%20at%2011.14.08.png?alt=media\&token=5bc11831-0237-4a9c-9401-d8431f629155)

```javascript
{! URLFOR( "/apex/VFListViewDataGridPage?", null, 
[
  c__lightningApp='c:VFListViewDataGridApp',
  c__object='Account',
   c__attributes='{"canCreate":true,"canClone":true,"canFilter":true}'
]
)}
```

{% hint style="info" %}
Mass Edit can be enabled on any object by duplicating the link below and changing the **c\_\_object** parameter only.
{% endhint %}

The link should be added to the list of actions on a ListView. &#x20;

![](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MFFC0b29nEm7BzPxo6U%2F-MFFJ9zFHT7IbVRhwcg4%2FScreenshot%202020-08-21%20at%2011.18.56.png?alt=media\&token=a515047f-5b8c-44d9-ac37-52cae105031d)

## Remote Site setup

GridMate uses API to fetch the ListView's metadata. Visualforce URL should be added to Remote Site Settings. See below :point\_down:&#x20;

![Remote Site settings](https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MEsSbGy_U_OhthKUpxu%2F-MFFC0b29nEm7BzPxo6U%2F-MFFKD-72KGmmCcqqHJW%2FScreenshot%202020-08-21%20at%2011.23.37.png?alt=media\&token=e44af774-7315-4ae5-9939-0253c7e86a0f)


# Components Library


# GM - RelatedList Grid

(gmpkg:RelatedListDataGridComponent)

## **Documentation**

**GM - RelatedList Grid** component is used to display a specified related list based on the assigned layout to the current user. This component requires the permission **API Enabled**.

**Use case:** Display a grid of opportunities on the account page.

{% hint style="info" %}
The GM - RelatedList Grid is driven by the Salesforce Related List established on the Page Layout. Users can add or remove fields on the Salesforce Related List for the changes to be reflected on the GM - RelatedList Grid.
{% endhint %}

{% hint style="info" %}

### GM - Related List Grid may not function on Gov Cloud due to restrictions from Salesforce. You are recommended to use a FieldSet Grid or a UserGrid to replicate the Related List

{% endhint %}

## **Specification**

The following properties use JSON syntax as part of their configuration: **Filter, Aggregate, Default Values, Actions, Related Record Grids, Custom Field Labels, Cell Coloring.**

The configuration wizard can be run to generate the required JSON strings for each of these properties. More details on the JSON syntax is available at the following location: [w3schools.com - JSON syntax.](https://www.w3schools.com/js/js_json_syntax.asp)

<table data-full-width="true"><thead><tr><th width="200.33333333333331">Property</th><th width="128">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Related List Label *</td><td>String</td><td>The label defined on the layout page. Set it to <strong>Contacts</strong> to display the list of contacts on the <strong>Account</strong> page.</td></tr><tr><td>DataGrid Code</td><td>String</td><td>The code to identify the DataGrid</td></tr><tr><td>Row Limit *</td><td>Integer</td><td>The maximum number of rows to fetch. The grid will never go beyond this number of records. The default value is 100.</td></tr><tr><td>Page Size *</td><td>Integer</td><td>The number of rows to fetch per step. If you have a contact related list of 50. If you set the Row Limit to 20 and the Page Size to 10. The first load of the grid will show 10 records and the grid title will be ‘Contacts (10+)’. The ‘+’ sign indicates that there are more records to load. You can fetch more rows using the ‘Load More’ button. The default value is 10.</td></tr><tr><td>Enable Pagination</td><td>Boolean</td><td>Check this option to enable pagination instead of scrolling. Can be combined with <strong>Enable Interactive Filters</strong> — see <a href="/advanced-guides/grid-interactive-filters#pagination">Interactive Filters</a>.</td></tr><tr><td>Custom Label</td><td>String</td><td>Override the title of the data grid. This is relevant when the related list is filtered. We can combine the filtering and the custom title to display different grids. You can filter only closed opportunities and set the title to <strong>Closed Opportunities.</strong></td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the data grid icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Grid Height</td><td>Integer</td><td><p>Set the grid height. Set this property if you want to control the height and show up components after the grid.</p><p>The user has to scroll vertically to see more records.</p><p>If the value is set 9999, The grid will use the remaining space on the page even if the user resizes the window. This behavior is relevant to build a responsive app page.</p></td></tr><tr><td>Formula Columns</td><td>String</td><td><p>JSON string to define formula columns. A formula column is not saved in the database. it's calculated on the fly when the grid is rendered or when the record is edited by the user.</p><p>The configuration wizard can be used to set this property (See <a href="/advanced-guides/grid-dynamic-formula-field">Dynamic Formula guide</a>).</p><p>The produced configuration can be be adjusted to set the column index of each formula. See the example below:</p><pre class="language-json"><code class="lang-json">{
    "name": "ARR9qfzn__f",
    "fieldApiName": "ARR9qfzn__f",
    "label": "ARR",
    "type": "Currency",
    "JSFormula": "Amount*12",
    "isClientSide": true,
    "isJSFormula": true,
    "digits": "0",
    "precision": "18",
    "scale": "2",
    "index": 2
}
</code></pre></td></tr><tr><td>Column Style</td><td>String</td><td><p>JSON string to override the column's style. Don’t forget __c for custom fields. This property can be used to default the width, the text alignment or wrapping for a specific column:</p><p><strong>To set the card header background:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__card_header": "background:lightblue"
}
</code></pre><p><strong>To set the height of the header:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__header": "height:4rem;whiteSpace:normal"
}
</code></pre><p><strong>To set the width of the any column:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__header": "width:120px;"
}
</code></pre><p><strong>To style the grouping row:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__group": "background: #6BBD6E;color: #FFFFFF"
}
</code></pre><p>Only the color and the background are supported.</p><p><strong>To style the total row:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__total": "background: #6BBD6E;color: #FFFFFF"
}
</code></pre><p>Only the color and the background are supported.</p><p><strong>To set the width:</strong></p><pre class="language-json"><code class="lang-json">{
    "StageName": "width:200px"
}
</code></pre><p><strong>To set the alignment:</strong></p><pre class="language-json"><code class="lang-json">{
    "Amount": "text-align:left"
}
</code></pre><p><strong>To set the text wrapping</strong>:</p><pre class="language-json"><code class="lang-json">{
    "Name": "cellcontent:wrap"
}
</code></pre><p><strong>To set the text wrapping during edit mode</strong>:</p><pre class="language-json"><code class="lang-json">{
    "Name": "celleditcontent:wrap"
}
</code></pre><p>This styling is available for <strong>String</strong> only. The field is edited through a textarea input.</p><p><strong>To set the number of visible lines for Long Text Area/Rich Text:</strong></p><pre class="language-json"><code class="lang-json">{
    "Notes": "line-clamp:3"
}
</code></pre></td></tr><tr><td>Hidden Columns</td><td>String</td><td><p>',' separated list of hidden columns. Don’t forget __c for custom fields.</p><p>Hidden columns are useful for coloring, read only conditions....They are not visibles to the end user. If the explorer is enabled, the hidden columns are not visibles as well.</p></td></tr><tr><td>Filter</td><td>String</td><td><p>JSON string to define filter criteria. Don’t forget __c for custom fields. To see only Opportunities which are more than $1000 enter the following:</p><pre class="language-json"><code class="lang-json">{
    "Amount": {
        "operator": ">",
        "value": "1000"
    }
}
</code></pre><p>We support operators below:</p><p>(‘=’,‘!=’,‘>’,‘>=’,‘&#x3C;=’,‘in’, ‘not in’, ‘includes’, 'excludes', ‘like’, ‘notLike’).</p><p>The configuration wizard can be used to build the filter query. For advanced configuration, see <a data-mention href="/advanced-guides/grid-advanced-filtering">Grid - Advanced Filtering</a></p></td></tr><tr><td>Sort</td><td>String</td><td><p>The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields.</p><p>To sort on multiple fields add a comma between field names. <code>Amount,StageName</code></p><p>We can define the order by field. If you define the order on the Sort, you don’t have to set if on the order.</p><p><code>Amount desc,StageName asc</code></p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value asc. For descending enter the value desc</td></tr><tr><td>Group By</td><td>String</td><td><p>',' separated list of fields to group by. Don’t forget __c for custom fields.</p><p>When an aggregation is defined, the Grid will display the intermediate aggregations at the group level.</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Collapse Groups</td><td>Boolean</td><td><p>Check this options to collapse groups by default.</p><p>This option is relevant only it the records are grouped.</p><p>The user can still expand a group. When a group is expanded, the user can select/unselect the whole group records using the checkbox at the group level.</p></td></tr><tr><td>Multi Level Grouping</td><td>Boolean</td><td>Multi Level Grouping</td></tr><tr><td>Aggregate</td><td>String</td><td><p>JSON string to define the aggregate field. Use __c for custom fields.</p><p>The supported functions are "sum", "min", "max", "avg" and "avgnotnull", "sumstr".</p><p>To aggregate and sum the ‘amount’ fieldset this property to be:</p><pre class="language-json"><code class="lang-json">{
    "Amount": "sum"
}
</code></pre><p>The configuration wizard can be used to set this property.</p><p>By default aggregated values are displayed on the header and on the bottom total row. The display can be controlled with advanced configuration using a JSON object per property:</p><pre class="language-json"><code class="lang-json">{
    "Amount": {
        "op": "sum",
        "label": "Total Amount",
        "nobottom": true,
        "notop": true
    }
}
</code></pre><p>Within this type of configuration, we can override the label and also define the calculated aggregated values:</p><pre class="language-json"><code class="lang-json">{
    "allocated__c": {
        "op": "max",
        "label": "Total Allocated",
        "nobottom": true
    },
    "invoiced__c": "sum",
    "Remaining": {
        "op": "formula",
        "label": "Remaining",
        "formula": "$allocated__c - $invoiced__c",
        "type": "Currency"
    }
}
</code></pre></td></tr><tr><td>Show Aggregate Header</td><td>Boolean</td><td>Show the aggregate header as a card on the top of the grid. The aggregate header will display the aggregate fields with their values on the grid header.</td></tr><tr><td>Enable Update Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to perform inline editing of the record displayed. This option will show or hide the '<strong>Edit Records</strong>' and '<strong>Mass Update</strong>' icons from the list of quick actions.</td></tr><tr><td>Enable Mass Update</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to perform mass updated on the displayed records. This option will show or hide the '<strong>Mass Update</strong>' icons from the list of quick actions.</td></tr><tr><td>Enable Delete Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to delete records. This option will show or hide the '<strong>Delete Records</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Create Object</td><td>Boolean</td><td><p>Check this option if you wish to allow the end-user to create new records.</p><p>This option will show or hide the '<strong>Create New Record</strong>' icon from the list of quick actions.</p><p><mark style="color:red;">⚠️</mark>When this option is checked, you may need to define the property Default Values to set the required fields for the object.</p></td></tr><tr><td>Enable Filter Object</td><td>Boolean</td><td><p>Check this option if you wish to allow the end-user to use filters.</p><p>This option will show or hide the filter combobox.</p></td></tr><tr><td>Enable Clone Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to clone records. This option will show or hide the '<strong>Clone Records</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Export Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to export records. This option will show or hide the '<strong>Export</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Import Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to import CSV files. This option will show or hide the '<strong>Import</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Freeze Columns</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to freeze columns. This option will show or hide the '<strong>Freeze Columns</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable View All</td><td>Boolean</td><td>Check this option if you want to use <strong>View All</strong> link.</td></tr><tr><td>Full Record Creation</td><td>Boolean</td><td><p>Check this option if you wish to create a full record instead of using a quick action.</p><p>If this option is activated, the user will be able to create a record using the assigned layout when he clicks on the ‘<strong>Create New Record</strong>’ button.</p><p>‘<strong>Default Values</strong>’ property is used to initialize the new record.</p></td></tr><tr><td>Disable Modal Creation</td><td>Boolean</td><td><p>Check this option if you wish to disable record creation when the grid is displayed in view mode.</p><p>If this option is activated, the user will not be able to create a record in view mode.</p></td></tr><tr><td>Disable Inline Creation</td><td>Boolean</td><td><p>Check this option if you wish to disable record creation when the grid is displayed in edit mode.</p><p>If this option is activated, the user will not be able to create a record in edit mode.</p></td></tr><tr><td>Disable Modal Modification</td><td>Boolean</td><td><p>Check this option if you wish to disable record edition when the grid is displayed in view mode.</p><p>If this option is activated, the user will not be able to edit a record in the view mode.</p></td></tr><tr><td>Disable Inline Modification</td><td>Boolean</td><td>Check this option if you wish to disable inline edition.</td></tr><tr><td>Default Values</td><td>String</td><td><p>JSON string to initialize a new object created from the data grid. Use __c for custom fields.</p><p>If you want to create a new opportunity record then set this field to:</p><pre class="language-json"><code class="lang-json">{
    "accountid": "$recordId",
    "name": "Opp 1",
    "closedate": "2019-10-01",
    "stagename": "Needs Analysis"
}
</code></pre><p>The JSON string should contain at least all the required fields of the object in lower case. $recordId can be used to implicitly use the current recordId.</p><p>The configuration wizard can be used to set this property.</p><p>Any field from the current object can be used. Parent fields can be referenced as a merge field $record.fieldApiName:</p><pre class="language-json"><code class="lang-json">{
    "Country__c": "$record.BillingCountry"
}
</code></pre><p>An apex class can be used to set the default value for a specific field:</p><pre class="language-json"><code class="lang-json">$APEX.CloseDateValueProvider({"Id":"$recordId"})
</code></pre></td></tr><tr><td>Hidden Fields</td><td>String</td><td><p>',' separated list of hidden fields for modal creation. When a user creates a new record, hidden fields will be defaulted but not displayed to the end-user (RecordTypeId for instance).</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Actions</td><td>String</td><td><p>JSON string to initialize the list of available actions from the data grid.</p><p>Custom actions are available from the dropdown menu. You can leverage your existing quick actions.</p><p>The configuration wizard can be used to build the list of actions</p><p>The visibility can be defined for each action based on the displayed master record.</p></td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td><p>Check this option if you wish to display actions as buttons instead of icons.</p><p>When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.</p></td></tr><tr><td>Custom Visible Actions</td><td>Integer</td><td><p>Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course.</p><p>The remaining custom actions will be added as an option on the button menu.</p></td></tr><tr><td>Record Actions</td><td>String</td><td><p>JSON string to initialize the list of available record actions. Row actions are available on each row in view mode only.</p><p>The configuration wizard can be used to build the list of actions.</p></td></tr><tr><td>Frozen Columns</td><td>Integer</td><td># of columns to freeze at startup.</td></tr><tr><td>Total Color</td><td>String</td><td>Total row text color</td></tr><tr><td>Total Background</td><td>String</td><td>Total row background color</td></tr><tr><td>Show Record Details</td><td>Boolean</td><td>Check this option to allow the end-user to view the record details in the grid</td></tr><tr><td>Record Related Components</td><td>String</td><td><p>A JSON string to add a list of inline component (Grids and Record Layouts) to display per record. Each inline grid should have:</p><ul><li>component: the name of GridMate component.</li><li>attributes: the list of attributes to configure, same as on the lightning app builder.</li></ul><p>All the component names and their attributes are available <a href="https://bitbucket.org/gridmate/gridmate-demo/src/master/config/design/">here</a>.</p><p>If you want to see the cases under a contacts grid then set this field to</p><pre class="language-json"><code class="lang-json">[
    {
        "component": "gmpkg:RelatedListDataGridComponent",
        "attributes": {
            "relatedListLabel": "Cases",
            "canCreate": false,
            "canUpdate": true,
            "canDelete": true,
            "recordDetail": true
        }
    }
]
</code></pre><p>The configuration wizard can be used to set this property. Configuration samples are available here <span data-gb-custom-inline data-tag="emoji" data-code="1f449">👉</span> <a href="/troubleshooting/config-samples">Config Snippets</a></p></td></tr><tr><td>Extra Record Related Components</td><td>String</td><td>A JSON string to add extra record related components. Use this option for a large related components configuration.</td></tr><tr><td>Edit Record Layout</td><td>String</td><td>A JSON string to customize the edit layout when editing a single record. The JSON should a valid record layout configuration <span data-gb-custom-inline data-tag="emoji" data-code="1f449">👉</span> <a href="/package-reference/components-library/gm-record-layout">GM - Record Layout</a></td></tr><tr><td>Search Fields</td><td>String</td><td><p>',' separated list of fields to search in. If the list is empty, the search input is hidden in action.</p><p>Only text fields (Text, PickList, Phone, Email, URL) are supported.</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Wildcard Search</td><td>Boolean</td><td>Check this option if you wish to use a wildcard search. If this option is activated, the end user doesn’t have to add ‘*’ to the search query.</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid.</td></tr><tr><td>Show Column Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid columns.</td></tr><tr><td>Custom Field Labels</td><td>String</td><td><p>A JSON string to override column label: {"AccountId":"Organization","StageName":"Step"}</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>ReadOnly Fields</td><td>String</td><td><p>',' separated list of read-only fields. The user will not be able to edit these fields the same as read-only fields on the page layout.</p><p>In a complex use case, a JSON string can be used instead to set the read-only condition for each field:</p><pre class="language-json"><code class="lang-json">{
    "fieldApiName": {
        "operator": "$operator",
        "value": "$value"
    }
}
</code></pre><p>In the example below Subject and Priority are locked when the case is closed:</p><pre class="language-json"><code class="lang-json">{
    "Subject": {
        "Status": {
            "operator": "=",
            "value": "Closed"
        }
    },
    "Priority": {
        "Status": {
            "operator": "=",
            "value": "Closed"
        }
    }
}
</code></pre><p>All the displayed fields can be used to handle complex logic and different operators are supported:</p><p>(‘=’,‘!=’,‘>’,‘>=’,‘&#x3C;=’, ‘in’, ‘includes’, 'excludes', 'like')</p><p>Conditions can be combined with conjunctions like ‘or’, ‘and’. Below is a complex condition:</p><pre class="language-json"><code class="lang-json">{
    "or": [
        {
            "Status": {
                "operator": "=",
                "value": "Closed"
            }
        },
        {
            "Priority": {
                "operator": "=",
                "value": "high"
            }
        }
    ]
}
</code></pre><p>Relative dates are supported:</p><pre><code>YESTERDAY()
TODAY()
TOMORROW()
LAST_N_DAYS
NEXT_N_DAYS
LAST_WEEK()
THIS_WEEK()
NEXT_WEEK()
LAST_MONTH()
THIS_MONTH()
NEXT_MONTH()
LAST_YEAR()
THIS_YEAR()
NEXT_YEAR()
</code></pre><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Cell Coloring</td><td>String</td><td><p>JSON conditions for cells coloring. You can define for each field displayed in the grid the coloring and the corresponding condition.</p><pre class="language-json"><code class="lang-json">{
    "CloseDate": [
        {
            "color": "#fac8d4",
            "exp": {
                "Late__c": {
                    "operator": "=",
                    "value": true
                }
            },
            "label": "Late Opp." 
        }
    ],
    "Amount": [
        {
            "color": "#d1fac8",
            "exp": {
                "Amount": {
                    "operator": ">",
                    "value": 50000
                }
            },
            "label": "Big Deal" 
        }
    ]
}
</code></pre><p>Coloring condition should be built it the same way as Read Only Fields.</p><p>To set the define a coloring at the row level, set the colored field to <strong>'*'.</strong> See the example below:</p><pre class="language-json"><code class="lang-json">{
    "*": [
        {
            "color": "#fac8d4",
            "exp": {
                "Late__c": {
                    "operator": "=",
                    "value": true
                }
            },
            "label": "Late Opp."
        }
    ]
}
</code></pre><p>Note that <strong>$recordId</strong> can be used to implicitly use the current recordId. The configuration wizard can be used to set this property<strong>.</strong> The label property is used to build a legend to the end user to give insights on the applied coloring.</p></td></tr><tr><td>Extra Cell Coloring</td><td>String</td><td>Extra JSON conditions for cells coloring. This property is useful for complex coloring that go beyond 2000 characters.</td></tr><tr><td>Lookup Fields Options</td><td>String</td><td><p>JSON string to customize lookup fields. You can define different aspects for each lookup field.</p><ul><li>Title field : Field ApiName for the title</li><li>Subtitle field : Field ApiName for subtitle</li><li>Candidates provider : In some situations, the search is very complex especially for lookup filters. In this case, you can bring your own Apex Class.</li><li>Pasted value provide: If lookup filters are enabled, you can bring your own Apex Class to filter the records based on the pasted values and the current record Id.</li><li>Create related record: Boolean to enable/disable record creation.</li><li>Default values : JSON string to set values for new record. This option is used only if the user is authorized to create a new record.</li></ul><pre class="language-json"><code class="lang-json">{
    "AccountId": {
        "titleField": "Name",
        "subTitleField": "Website",
        "candidatesProvider": "CaseAccountCandidatesProvider",
        "pastedValueProvider": "CaseAccountCandidatesProvider",
        "refObjCreateable": true,
        "defaultValues": {
            "RecordTypeId": "0123i000000d27DAAQ",
            "Type": "Prospect"
        }
    }
}
</code></pre></td></tr><tr><td>Disable Refresh View</td><td>Boolean</td><td>Check this option if you wish to avoid the page load when the grid is saved. This option is automatically set to true for inline grids.</td></tr><tr><td>Enable Dynamic Interactions</td><td>Boolean</td><td>Check this option if you want to enable dynamic interactions. When this option is enabled, the grid publish a Row Clicked event when a row is selected. This option is required a <a href="/advanced-guides/grid-dynamic-interaction">Dynamic Interaction</a> experience.</td></tr><tr><td>Enable Split View</td><td>Boolean</td><td>Check this option if you want to enable split view. When this option is enabled, the inline components are displayed on the right side. See <a href="/advanced-guides/inline-grid-setup#split-view-setup">Split View example</a>.</td></tr><tr><td>Enable Interactive Filters</td><td>Boolean</td><td>Check this option if you want to enable interactive filters. With this option enabled, the user can easily filter the records at the column level either by selecting the values or defining conditions. See <a href="/advanced-guides/grid-interactive-filters">Interactive Filters</a>.</td></tr><tr><td>Enable Auto Fill</td><td>Boolean</td><td>Check this option if you want to enable auto fill. With this option enabled, the user can drag to fill values like Excel.</td></tr><tr><td>Enable Cell Editing</td><td>Boolean</td><td>Check this option if you want to enable cell editing</td></tr><tr><td>Enable Parent Field Editing</td><td>Boolean</td><td>Check this option if you want to enable parent field editing</td></tr><tr><td>Enable Config Checker</td><td>Boolean</td><td>Check this option if you want to enable the Config. Checker. With this option enabled, the user will be able to validate the component configuration. See <a href="/advanced-guides/grid-config-checker">Grid - Config Checker</a>.</td></tr><tr><td>Auto Select 1st Row</td><td>Boolean</td><td>Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled</td></tr><tr><td>Default Mode</td><td>String</td><td><p>String to define the initial display mode of the grid (<strong>edit</strong> | <strong>read</strong> | <strong>editOnly</strong>).</p><p>If this property is set to <strong>edit</strong>, the grid is displayed in edit in the first load of the page.</p><p>If this property is set to <strong>editOnly</strong>, the grid is displayed in edit all the time.</p></td></tr><tr><td>Enable Grid Collapse</td><td>Boolean</td><td>Check this option if you want to enable Grid collapse. When this option is activate, the end user can minimize the Grid.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen for the Grid. When this option is active, the end user can open the Grid in fullscreen dialog.</td></tr><tr><td>Enable Explorer</td><td>Boolean</td><td>Check this option if you want to use the Grid Explorer. When this option is active, the end user will be able to explore the grid through the Explorer by filtering the records, hiding or reordering the columns and also by setting the grouping.</td></tr><tr><td>Split Width</td><td>Integer</td><td>Set the split view width. Applicable only the split view is enabled</td></tr><tr><td>Density</td><td>String</td><td>Grid density: <strong>comfy</strong> | <strong>compact</strong>. Currently the density is applied only to the toolbar. The compact layout is more for inline Grids.</td></tr><tr><td>Object Name</td><td>String</td><td>SObject to use. Useful only for dynamic interaction.</td></tr></tbody></table>

{% hint style="info" %}
Lightning App Builder support custom labels to dynamically configure any component property. This feature is useful when dealing record types or any property depending on the environment. Below is an example of default values using custom labels:

```json
{
    "RecordTypeId": "{!$Label.Outbound_Contact}"
}
```

{% endhint %}

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RelatedListDataGridComponent.design" %}
{% code fullWidth="true" %}

```xml
<design:component label="GM - RelatedList Grid">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedListLabel" label="Related List Label" 
                      description="The label defined in the layout page. Ex. Contacts to display contact list on account page"/>    
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                            
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Can be combined with interactive filters"/>                      
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/> 
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>     
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>                           
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>     
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                      description="',' separated list of fields to group by"/>                              
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                      description="Collapse groups"/>                                                                              
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                      description="Multi Level Grouping"/>                      
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>        
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                                                
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/> 
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>      
    <design:attribute name="canViewAll" label="Enable View All" 
                      description="Check this option if you want to use viewAll link"/>                                                    
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                                                                          
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                                                                                                                              
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                                                                                                                                                                          
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                          
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>  
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>      
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>  
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>                  
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>                       
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/>                                              
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/>
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>                                                                                                                
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                                                                                            
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                         
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>        
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                                     
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/> 
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                         
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                      
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>    
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>    
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                                            
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/>   
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/>                            
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>                         
    <design:attribute name="sObjectName" label="Object Name" 
                      description="SObject to use. Usefull only for dynamic interaction"/>                                                                                           
</design:component>
```

{% endcode %}
{% endtab %}

{% tab title="Public Event Handlers" %}
**Event Handler registration**

```xml
<aura:registerEvent name="onCellChange" type="c:DataGridCellChangeEvent" access="global" />
```

**DataGridCellChangeEvent** properties:

```xml
<aura:event type="COMPONENT" description="Cell Change Event" access="global">
    <aura:attribute
        name="item"
        type="Object"
        description="Item"
        access="global"
    />
    <aura:attribute
        name="column"
        type="Object"
        description="Cell Column"
        access="global"
    />
    <aura:attribute
        name="value"
        type="Object"
        description="Cell Value"
        access="global"
    />
</aura:event>
```

{% endtab %}

{% tab title="Public Methods" %}

```xml
<!-- Use this methode to set error for a given record-->
<aura:method name="setRecordError" action="{!c.setRecordError}" access="global">
        <aura:attribute name="item" type="Object" />
        <aura:attribute name="error" type="Object" />
</aura:method>

<!-- Use this methode to set the display mode for a given cell-->
<aura:method name="setCellDisplayMode" action="{!c.setCellDisplayMode}" access="global">
    <aura:attribute name="item" type="Object" />
    <aura:attribute name="column" type="Object" />
    <aura:attribute name="mode" type="String" />
</aura:method>

<!-- Use this methode to set the error for a given cell-->
<aura:method name="setCellError" action="{!c.setCellError}" access="global">
    <aura:attribute name="item" type="Object" />
    <aura:attribute name="column" type="Object" />
    <aura:attribute name="error" type="Object" />
</aura:method>

<!-- Use this methode to set the value for a given cell-->
<aura:method name="setCellValue" action="{!c.setCellValue}" access="global">
    <aura:attribute name="item" type="Object" />
    <aura:attribute name="column" type="Object" />
    <aura:attribute name="value" type="Object" />
</aura:method>

<!-- Use this methode to get the value for a given cell-->
<aura:method name="getCellValue" action="{!c.getCellValue}" access="global">
    <aura:attribute name="item" type="Object" />
    <aura:attribute name="column" type="Object" />
</aura:method>
```

{% endtab %}
{% endtabs %}

## Lookup Providers

The candidates provider class should implement a Callable interface. GridMate delegates the candidates search to the given provider:

```java
Callable handler =  (Callable) Type.forName(candidatesProvider).newInstance();
            return (Object[]) handler.call('getLookupCandidates', new Map<String, Object>{
                                              'objectId' => objectId,
                                              'refObjName' => refObjName,
                                              'refFieldName'=> refFieldName,
                                              'searchTerm'=> searchTerm,
                                              'titleField'=> titleField,
                                              'subTitleField'=> subTitleField});
```

The example below showcase a specific provider for ‘**AccountId**’ on **Case** object:

{% hint style="warning" %}
The apex class should be declared as global. If not we will not be able to instantiate the class from the managed package.
{% endhint %}

```java
global class CaseAccountCandidatesProvider implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if(action=='getLookupCandidates'){
            String query = 'Select Id, Name From Account';            
            String searchTerm = (String)args.get('searchTerm');
            if(searchTerm != null){query += ' Where Name like \'' +  searchTerm + '%\'';}
            query += ' Limit 5';           
            List<Object> items = Database.query(query);                            
            if(items != null && items.size()>0){
                String jsonItems = JSON.serialize(items);
                return (List<Object>)JSON.deserializeUntyped(jsonItems);
            }
            return null;
       }else {throw new ExtensionMalformedCallException('Action not implemented');}
    }
    public class ExtensionMalformedCallException extends Exception {
    }
}
```

The pasted values provider class should implement a Callable interface. GridMate delegates the search to the given provider:

```java
Callable handler = (Callable) Type.forName(pastedValueProvider).newInstance();
                return (Object[]) handler.call(
                    'getLookupRecords',
                    new Map<String, Object>{
                        'recordId' => recordId,
                        'refObjName' => refObjName,
                        'titleField' => titleField,
                        'searchNames' => searchNames
                    }
                );
```

The example below showcase a specific provider for ‘**AccountId**’ on **Case** object:

{% hint style="warning" %}
The apex class should be declared as global. If not we will not be able to instantiate the class from the managed package.
{% endhint %}

```java
global class CaseAccountPastedValueProvider implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getLookupRecords') {
            String recordId = (String) args.get('recordId');
            String titleField = (String) args.get('titleField');
            String[] searchNames = (String[]) args.get('searchNames');
            
            String query = 'Select Id, Name, BillingCity From Account';
            query += ' Where Name in :searchNames';
            
            return Database.query(query);
            
        } else {
            throw new ExtensionMalformedCallException('Action not implemented');
        }
    }
    public class ExtensionMalformedCallException extends Exception {
    }
}
```

Both providers can be handle by the same apex class. See example below:

```java
global class CaseAccountLookupProvider implements Callable {
    global Object call(String action, Map<String, Object> args) {
        if (action == 'getLookupRecords') {
            return getLookupRecords(args);
        } else if (action == 'getLookupCandidates') {
            return getLookupCandidates(args);
        } else {
            throw new ExtensionMalformedCallException('Action not implemented');
        }
    }

    private static Object getLookupRecords(Map<String, Object> args) {
        String recordId = (String) args.get('recordId');
        String titleField = (String) args.get('titleField');
        String[] searchNames = (String[]) args.get('searchNames');

        String query = 'Select Id, Name, BillingCity From Account';
        query += ' Where Name in :searchNames';

        return Database.query(query);
    }

    private static Object getLookupCandidates(Map<String, Object> args) {
        String recordId = (String) args.get('recordId');
        String searchTerm = (String) args.get('searchTerm');

        String query = 'Select Id, Name, BillingCity From Account';
        if (searchTerm != null) {
            query += ' Where Name like \'' + searchTerm + '%\'';
        }
        query += ' Limit 5';

        List<Object> items = Database.query(query);
        if (items != null && items.size() > 0) {
            String jsonItems = JSON.serialize(items);
            return (List<Object>) JSON.deserializeUntyped(jsonItems);
        }

        return null;
    }
    public class ExtensionMalformedCallException extends Exception {
    }
}
```

## Grid Wrapping

GM - RelatedList Grid is an Aura Component and therefore can be wrapped in another component through composition. Below is an example of what could be done:

{% tabs %}
{% tab title="ContactsGridComponent.cmp" %}

```xml
<aura:component
    implements="flexipage:availableForAllPageTypes,force:hasSObjectName,force:hasRecordId"
    access="global"
>
    <gmpkg:RelatedListDataGridComponent
        aura:id="relatedGrid"
        recordId="{! v.recordId }"
        sObjectName="Account"
        relatedListLabel="Contacts"
        onCellChange="{! c.handleCellChange }"
    />
</aura:component>

```

{% endtab %}

{% tab title="ContactsGridComponentController.js" %}

```coffeescript
({
    handleCellChange: function (component, event, helper) {
        let dataGrid = component.find('relatedGrid');

        let item = event.getParam('item');
        let column = event.getParam('column');
        let value = event.getParam('value');

        if (column.fieldApiName === 'Approval_Status__c') {
            if (value === 'Accepted') {                
                dataGrid.setCellDisplayMode(item.UID, 'Title', 'read');                
            } else {
                dataGrid.setCellDisplayMode(item.UID, 'Title', 'edit');                
            }
        }       
    }
});

```

{% endtab %}
{% endtabs %}


# GM - FieldSet Grid

(gmpkg:FieldSetDataGridComponent)

## **Documentation**

**GM - FieldSet Grid** component is used to display a list of records using a specific Field Set. This component does not require the permission **API Enabled** and therefore can be used for communities.

**Use case:** Display a grid of opportunities on the account page in a community.

## **Specification**

**GM - FieldSet Grid** component has the same properties as [**GM - RelatedList Grid**](/package-reference/components-library/gm-relatedlist-grid) except for the following attributes.

<table data-full-width="true"><thead><tr><th width="277">Property</th><th width="104.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Related Object Name*</td><td>String</td><td>The name of the related object to display.</td></tr><tr><td>FieldSet Name*</td><td>String</td><td>The Field Set name of the related object to display.</td></tr><tr><td>Community Visibility Condition</td><td>String</td><td>JSON visibility condition. To use for Community only. The condition should be built it the same way as Read-Only Fields</td></tr></tbody></table>

{% hint style="info" %}
Don’t forget to filter your records. By default, this component will select all the records on the specified **Related Object Name**. You can use **$recordId** in the filter property to get the relevant records.
{% endhint %}

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FieldSetDataGridComponent.design" %}

```xml
<design:component label="GM - FieldSet Grid">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedObjectName" label="Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="fieldSetName" label="Field Set" 
                      description="FieldSet name or ',' separated list of fields to display"/> 
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                           
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>  
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Can be combined with interactive filters"/>
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>  
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>     
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>     
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>         
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                        description="',' separated list of fields to group by"/>                              
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                        description="Collapse groups"/>   
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                        description="Multi Level Grouping"/>                                                                                
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>        
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>        
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>    
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                      
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/>    
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>    
    <design:attribute name="canViewAll" label="Enable View All" 
                      description="Check this option if you want to use viewAll link"/>                          
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                                                                          
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                                                                                                                              
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>   
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                                                                                                                                                                          
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>  
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>          
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>  
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>              
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>           
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/>                                              
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>  
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/>                                                                                          
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>    
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                          
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                                                                                                            
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>          
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                                              
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/>     
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                         
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                     
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>        
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>    
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>    
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                      
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>        
    <design:attribute name="jsonVisibility" label="Community Visibility Condition" 
                      description="JSON visibility condition. To use only for community"/>    
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/> 
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/> 
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>                  
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - ListView Grid

(gmpkg:ListViewDataGridComponent)

## **Documentation**

**GM - ListView** Grid component is used to display a list of records using a specific ListView.

**Use case:** Display a grid of opportunities on a specific app page. This component can be used to build workspaces like Sales Development Reps Workspace.

## **Specification**

**GM - ListView Grid** component has the same properties as [**GM - RelatedList Grid**](/package-reference/components-library/gm-relatedlist-grid) except for the following attributes.

<table data-full-width="true"><thead><tr><th width="233">Property</th><th width="94.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Related Object Name *</td><td>String</td><td>The name of the related object to display.</td></tr><tr><td>ListView Name *</td><td>String</td><td>The ListView API Name of the related object to display.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="ListViewDataGridComponent.design" %}

```xml
<design:component label="GM - ListView Grid">
    <design:attribute name="relatedObjectName" label="Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="listViewName" label="ListView Name" 
                      description="The listView name of the related object to display"/> 
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                            
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>  
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Can be combined with interactive filters"/>                      
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>  
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>     
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>                           
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>     
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                      description="',' separated list of fields to group by"/>                              
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                      description="Collapse groups"/>   
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                      description="Multi Level Grouping"/>                                                                                                 
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>            
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>    
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                                                
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>                          
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/>    
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>    
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                      
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                                                                                                                              
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                                                                                                                                                                          
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                          
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>  
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>          
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>      
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>          
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>                                
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/>                                              
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/>
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>     
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                                                                                            
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                                                                                                                                        
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>            
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                                              
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/>     
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>  
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                           
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                     
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>        
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>    
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>    
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                                            
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>    
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/>
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/>                            
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>                                                                 
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - User Grid

(gmpkg:UserDataGridComponent)

## **Documentation**

GridMate's User Grid component presents a powerful solution, providing users with customizable grids packed with robust features:

* Efficient data filtering and sorting,
* Record grouping,
* Layout customization,
* Actions on multiple records,
* Formula field creation,
* Inline Editing
* Import/Export
* Dynamic Interactions
* ...and much more

This tool optimizes data management and productivity, empowering users to efficiently organize and manipulate their Standard/Custom Object data through easy configuration.

**Use case:** Display a grid of opportunities to maintain easily the pipeline for a Salesman. see [GM - User Grid](/product-tour/user-grid).

## **Specification**

<table data-full-width="true"><thead><tr><th width="175.33333333333331">Property</th><th width="162">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record</td></tr><tr><td>UserGrid Id*</td><td>String</td><td>Id of the User Grid to use.</td></tr><tr><td>Inline Label</td><td>String</td><td>Inline label. Override the label instead of using the label of the user grid.</td></tr><tr><td>Inline Filter</td><td>String</td><td><p>Json string to define inline filter criteria. This filter will be added on the top of what is defined on the grid.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>Filter</strong> property for more details.</p></td></tr><tr><td>height</td><td>String</td><td>Set the grid height.</td></tr><tr><td>Grid Height</td><td>Integer</td><td><p>Set the grid height. Set this property if you want to control the height and show up components after the grid.</p><p>The user has to scroll vertically to see more records.</p><p>If the value is set 9999, The grid will use the remaining space on the page even if the user resizes the window. This behavior is relevant to build a responsive app page.</p></td></tr><tr><td>Split Width</td><td>Integer</td><td>Set the split view width. Applicable only the split view is enabled</td></tr><tr><td>Density</td><td>String</td><td>Grid density : <strong>comfy</strong> | <strong>compact</strong>. Currently the density is applied only to the toolbar. The compact layout is more for inline Grids.</td></tr><tr><td>Disable Refresh View</td><td>String</td><td>Check this option if you want to disable the view refresh after an update. When checked, the grid reloads itself instead of refreshing the page, and the <strong>Config. Wiz</strong>, <strong>SOQL Preview</strong> and <strong>Inline Config.</strong> toolbar actions are hidden.</td></tr><tr><td>Enable Dynamic Interactions(Beta)</td><td>String</td><td>Check this option if you want to enable dynamic interactions.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>String</td><td>Check this option if you want to enable toggle fullscreen.</td></tr><tr><td>Disable Navigation</td><td>String</td><td>Hide the navigation to the grid.</td></tr><tr><td>Auto Select 1st Row</td><td>Boolean</td><td>Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="UserDataGridComponent.design" %}

```xml
<design:component label="GM - User Grid">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>                                                         

    <design:attribute name="userGridId" label="UserGrid Id or Developer Name" 
                      description="GM - UserGrid Id or Developer Name to use"/>   

    <design:attribute name="displayLabel" label="Inline Label" 
                      description="Inline label. Override the label instead of using the label of the user grid"/>        

    <design:attribute name="adminFilter" label="Inline Filter" 
                      description="Json string to define inline filter criteria"/>        
    
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>                            

    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>  
    
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>              

    <design:attribute name="canInteract" label="Enable Dynamic Interactions(Beta)" 
                      description="Check this option if you want to enable dynamic interactions"/>           

    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>   

    <design:attribute name="noNavigation" label="Disable Navigation" 
                      description="Hide the navigation to the grid"/> 
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Parent RelatedList Grid

(gmpkg:ParentRelatedListDataGridComponent)

## **Documentation**

**GM - Parent RelatedList Grid** component is used to display a list of records using a specific related list of a parent record. This component requires the permission **API Enabled**.

**Use case:** Display a grid of contacts on the opportunity page based on the opportunity account.

## **Specification**

**GM - Parent RelatedList Grid** component has the same properties as [**GM - RelatedList Grid**](/package-reference/components-library/gm-relatedlist-grid) except for the following attributes:

<table data-full-width="true"><thead><tr><th width="182.33333333333331">Property</th><th width="136">Type</th><th>Description</th></tr></thead><tbody><tr><td>Object Name *</td><td>String</td><td>The name of the related object to display.</td></tr><tr><td>Record Id Field *</td><td>String</td><td>The name of the lookup field to fetch. If you want to display the list of <strong>contacts</strong> of the opportunity account, set this property to <strong>AccountId</strong>.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="ParentRelatedListDataGridComponent.design" %}

```xml
<design:component label="GM - Parent RelatedList Grid">
    <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="relatedListLabel" label="Related List Label" 
                      description="The label defined in the layout page. Ex. Contacts to display contact list on account page"/>    
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                            
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Can be combined with interactive filters"/>                      
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/> 
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>                           
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>                           
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>         
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                      description="',' separated list of fields to group by"/>                              
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                      description="Collapse groups"/>
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                      description="Multi Level Grouping"/>                      
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>                
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                                                
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/> 
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>   
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                                                                          
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                                                                                                                              
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                                                                                                                                                                              
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                          
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>      
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>      
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>      
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>                  
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>           
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/> 
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>   
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/>                                                       
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>       
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                                                                                            
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                                                                                                                                 
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>            
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                               
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/> 
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                             
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                     
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>    
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>    
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>     
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                                            
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>    
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/>  
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/>                            
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>                              
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - FieldSet Kanban

(gmpkg:FieldSetKanbanDataGridComponent)

## **Documentation**

**GM - FieldSet Kanban** component is used to display a list of records using a specific **FieldSet** across a navigation path. This component gives you a big picture view of all your work and lets you easily filter your records along your pipeline.

**Use case**: Display a Kanban of opportunities on a specific app page. This component can be used to build workspaces like Sales Development Reps Workspace.

## **Specification**

**GM - FieldSet Kanban** component has the same properties as [**GM - ListView Grid**](/package-reference/components-library/gm-listview-grid) except for the following attributes.

<table data-full-width="true"><thead><tr><th width="182">Property</th><th width="94.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Kanban Stages *</td><td>String</td><td><p>JSON string to define the stages. Each stage has:</p><ul><li><strong>label</strong>: the stage label</li><li><strong>filter</strong>: the stage filter. This property defines the records that should be displayed under this stage. The configuration wizard can be used to define this property.</li></ul><p>The example below can be used to display opportunities based on the stage value</p></td></tr></tbody></table>

Example of Kanban Stages configuration

```coffeescript
[
   {
      "label": "Interact",
      "filter": {
         "StageName": {
            "operator": "in",
            "value": "('Prospecting','Qualification')"
         }
      }
   },
   {
      "label": "Propose",
      "filter": {
         "StageName": {
            "operator": "in",
            "value": "('Value Proposition', 'Id. Decision Makers')"
         }
      }
   }
]
```

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FieldSetKanbanDataGridComponent.desgin" %}

```xml
<design:component label="GM - FieldSet Kanban">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedObjectName" label="Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="fieldSetName" label="FieldSet Name" 
                      description="The fieldSet name of the related object to display"/> 
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                            
    <design:attribute name="jsonStages" label="Kanban Stages" 
                      description="Json Kanban Stages. [{'label' : value, 'filter' : value}]"/>    
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Note this option is not compatible with interactive filters"/>                      
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>    
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>                           
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>                           
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>         
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                      description="',' separated list of fields to group by"/>                          
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                      description="Collapse groups"/>
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                      description="Multi Level Grouping"/>                      
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>                
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                                                
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/> 
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>   
    <design:attribute name="canViewAll" label="Enable View All" 
                      description="Check this option if you want to use viewAll link"/>                           
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                                                                          
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                          
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                                                                                                                                                                              
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                         
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>      
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>      
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>      
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>                  
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>           
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/>                          
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>   
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/> 
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>     
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                                                
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                                                                                                                                                                                                                                 
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>            
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                                              
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/> 
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                          
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                                    
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>    
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>    
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>     
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                      
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>    
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/>  
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/>                            
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>        
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - ListView Kanban

(gmpkg:KanbanDataGridComponent)

## **Documentation**

**GM - ListView Kanban** component is used to display a list of records using a specific ListView across a navigation path. This component gives you a big picture view of all your work and lets you easily filter your records along your pipeline.

**Use case**: Display a Kanban of opportunities on a specific app page. This component can be used to build workspaces like Sales Development Reps Workspace.

## **Specification**

**GM - ListView Kanban** component has the same properties as [**GM - ListView Grid**](/package-reference/components-library/gm-listview-grid) except for the following attributes.

<table data-full-width="true"><thead><tr><th width="192.33333333333331">Property</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>Kanban Stages *</td><td>String</td><td><p>JSON string to define the stages. Each stage has:</p><ul><li>label: the stage label</li><li>filter: the stage filter. This property defines the records that should be displayed under this stage. The configuration wizard can be used to define this property.</li></ul><p>The example below can be used to display opportunities based on the stage value</p></td></tr></tbody></table>

Example of Kanban Stages configuration

```coffeescript
[
   {
      "label": "Interact",
      "filter": {
         "StageName": {
            "operator": "in",
            "value": "('Prospecting','Qualification')"
         }
      }
   },
   {
      "label": "Propose",
      "filter": {
         "StageName": {
            "operator": "in",
            "value": "('Value Proposition', 'Id. Decision Makers')"
         }
      }
   }
]
```

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="KanbanDataGridComponent.design" %}

```xml
<design:component label="GM - ListView Kanban">
    <design:attribute name="relatedObjectName" label="Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="listViewName" label="ListView Name" 
                      description="The listView name of the related object to display"/> 
    <design:attribute name="dataGridCode" label="DataGrid Code" 
                      description="The code to identify the DataGrid"/>                            
    <design:attribute name="jsonStages" label="Kanban Stages" 
                      description="Json Kanban Stages. [{'label' : value, 'filter' : value}]"/>    
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Note this option is not compatible with interactive filters"/>                      
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>    
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>                           
    <design:attribute name="hiddenColumns" label="Hidden Columns" 
                      description="',' separated list of hidden columns"/>                           
    <design:attribute name="columnStyles" label="Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>         
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="groupBy" label="Group By" 
                      description="',' separated list of fields to group by"/>                      
    <design:attribute name="collapseGroups" label="Collapse Groups" 
                      description="Collapse groups"/>         
    <design:attribute name="multiLevelGrouping" label="Multi Level Grouping" 
                      description="Multi Level Grouping"/>                                                                                           
    <design:attribute name="showAggregateHeader" label="Show Aggregate Header" 
                      description="Show the aggregate header as card on the top of the grid"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canMassUpdate" label="Enable Mass Update" 
                      description="Check this option if you want to mass update objects"/>                
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canMassDelete" label="Enable Mass Delete" 
                      description="Check this option if you want to mass delete objects"/>                                                
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/> 
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/>    
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>   
    <design:attribute name="canExplore" label="Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                                                                          
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>                       
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                                                                                                                                                                              
    <design:attribute name="canCreateFormula" label="Enable Create Formula" 
                      description="Check this option if you want to enable dynamic formula"/>                          
    <design:attribute name="noModalModification" label="Disable Modal Modification" 
                      description="Check this option if you want to disable modal modification"/>      
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>      
    <design:attribute name="noModalCreation" label="Disable Modal Creation" 
                      description="Check this option if you want to disable modal object creation"/>  
    <design:attribute name="noInlineCreation" label="Disable Inline Creation" 
                      description="Check this option if you want to disable inline object creation"/>      
    <design:attribute name="noInlineModification" label="Disable Inline Modification" 
                      description="Check this option if you want to disable inline modification"/>                        
    <design:attribute name="inline" label="Disable Refresh View" 
                      description="Check this option if you want to disable the view refresh after an update"/>                  
    <design:attribute name="canInteract" label="Enable Dynamic Interactions" 
                      description="Check this option if you want to enable dynamic interactions"/>       
    <design:attribute name="canInMemFilter" label="Enable Interactive Filters" 
                      description="Check this option if you want to enable interactive filters"/>      
    <design:attribute name="canSplit" label="Enable Split View" 
                      description="Check this option if you want to enable split view"/>                             
    <design:attribute name="canLinkUserFilter" label="Enable Quick Filter Links" 
                      description="Check this option if you want to enable quick filter links"/>                      
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/> 
    <design:attribute name="canInlineEditCell" label="Enable Cell Editing" 
                      description="Check this option if you want to enable cell editing"/>    
    <design:attribute name="canEditParentField" label="Enable Parent Field Editing" 
                      description="Check this option if you want to enable parent field editing"/>                                                                                            
    <design:attribute name="canCheckConfig" label="Enable Config Checker" 
                      description="Check this option if you want to enable the config. checker"/>                                                                                                                                               
    <design:attribute name="selectFirstRow" label="Auto Select 1st Row" 
                      description="Check this option if you want to select the first row automatically. Applicable only if dynamic interaction or split view is enabled"/>                                                                                                            
    <design:attribute name="openSplitView" label="Open Split View" 
                      description="Open the split view by default. Applicable only if split view is enabled and the first row automatically selected"/>                                                  
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available actions from the data grid"/>
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>            
    <design:attribute name="jsonRecordActions" label="Record Actions" 
                      description="Json string to initialize the list of available record actions"/>                                              
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/> 
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="recordDetail" label="Show Record Details" 
                      description="Show record details"/>    
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    
    <design:attribute name="extraRecordRelated" label="Extra Record Related Components" 
                      description="Extra Record Related Components"/>                             
    <design:attribute name="editRecordLayout" label="Edit Record Layout" 
                      description="Json string to for a custom edit layout"/>                                    
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>    
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>    
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>     
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="extraColoring" label="Extra Cell Coloring" 
                      description="JSON conditions for cells coloring. Use this property to by pass App Builder limitation"/>                                            
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>    
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/> 
    <design:attribute name="splitWidth" label="Split Width" 
                      description="Set the split view width. Applicable only the split view is enabled"/>                                                                       
    <design:attribute name="density" label="Density" 
                      description="Grid density : comfy | compact"/>        
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - FieldSet Pivot

(gmpkg:FieldSetPivotGridComponent)

## **Documentation**

**GM - FieldSet Pivot** component is used to display a collection of records as a Pivot Table. With this component, we can display time series records with the ability to summarize and edit the data.&#x20;

**Use case:** Display a **Forecast Grid** where the forecast can be set by Opportunity and by Month. See [Pivot Grid Tutorial](/product-tour/pivot-grid-in-action)

## **Specification**

<table data-full-width="true"><thead><tr><th width="231">Property</th><th width="114.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Related Object Name *</td><td>String</td><td>The name of the related object to display</td></tr><tr><td>Field Set*</td><td>String</td><td>The Field Set name of the related object to display</td></tr><tr><td>Formula Columns</td><td>String</td><td>Json string to define formula columbs. Use the configurations wizard to produce the property value</td></tr><tr><td>X Columns *</td><td>String</td><td><p>JSON Array of field API Names to build X columns of the Pivot Grid. </p><p></p><p>Don’t forget __c for custom fields.</p></td></tr><tr><td>X Column Sort</td><td>String</td><td><p>The field to sort with to create the pivot header. </p><p></p><p>If this field is empty, X Column field will be used.</p></td></tr><tr><td>X Column Order</td><td>String</td><td><p>The order for X Column Sort (<strong>asc|desc</strong>). </p><p></p><p>Keep it empty for ascending or if X Column Sort is empty</p></td></tr><tr><td>Y Columns *</td><td>String</td><td><p>JSON Array of field API Names to build Y columns of the Pivot Grid. </p><p></p><p>Don’t forget __c for custom fields</p></td></tr><tr><td>Y Hidden Columns</td><td>String</td><td><p>Y Hidden Columns API Name. The records will be grouped by Y Columns, however the hidden columns will not be displayed to the end user.</p><p></p><p>Don’t forget __c for custom fields</p></td></tr><tr><td>Value Columns *</td><td>String</td><td><p>The list of columns to display/edit on the grid as cells. </p><p></p><p>Don’t forget __c for custom fields</p></td></tr><tr><td>Row Limit *</td><td>Integer</td><td>The maximum number of rows to fetch.</td></tr><tr><td>Page Size *</td><td>Integer</td><td>The number of rows to fetch per step. </td></tr><tr><td>Enable Pagination</td><td>Boolean</td><td>Check this option to enable pagination instead of scrolling. Note this option is not compatible with interactive filters.</td></tr><tr><td>Paging Field Name</td><td>String</td><td>Paging field API name. Set this property to handle custom pagination. See <a href="/product-tour/pivot-grid-in-action#search-property">Advanced Pagination</a></td></tr><tr><td>Paging Filter</td><td>String</td><td>JSON string to define the paging filter. Set this property to handle custom pagination.</td></tr><tr><td>Paging Sort</td><td>String</td><td>The field list to set the paging sort. Set this property to handle custom pagination.</td></tr><tr><td>Paging Order</td><td>String</td><td>Asc or Desc order for paging sort. Set this property to handle custom pagination.</td></tr><tr><td>Custom Label</td><td>String</td><td>Override the title of the data grid.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the data grid icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Grid Height</td><td>Integer</td><td>Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Sort</td><td>String</td><td>The field list to sort the data grid. This field is used only for the initial load.  Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value asc. For descending enter the value desc</td></tr><tr><td>Aggregate</td><td>String</td><td>JSON string to define the aggregate field. Use __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Enable Update Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to perform inline editing of the grid.</td></tr><tr><td>Enable Delete Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to delete records. This option will show or hide the 'delete items' icon from the list of quick actions.</td></tr><tr><td>Enable Create Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to create new records. This option will show or hide the 'create records' icon from the list of quick actions. ⚠️When this option is checked, you may need to define the property Default Values to set the required fields for the object.</td></tr><tr><td>Enable Clone Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to clone records. This option will show or hide the 'clone records' icon from the list of quick actions.</td></tr><tr><td>Enable Filter Object</td><td>Boolean</td><td><p>Check this option if you wish to allow the end-user to use filters.</p><p>This option will show or hide the filter combobox.</p></td></tr><tr><td>Enable Freeze Columns</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to freeze columns. This option will show or hide the '<strong>Freeze Columns</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Export Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to export records. This option will show or hide the '<strong>Export</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Import Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to import CSV files. This option will show or hide the '<strong>Import</strong>' icon from the list of quick actions.</td></tr><tr><td>Enable Grid Collapse</td><td>Boolean</td><td>Check this option if you want to enable grid collapse.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen for the Grid. When this option is active, the end user can open the Grid in fullscreen dialog.</td></tr><tr><td>Enable Auto Fill</td><td>Boolean</td><td>Check this option if you want to enable auto fill. With this option enabled, the user can drag to fill values like Excel.</td></tr><tr><td>Enable Cell Edit</td><td>Boolean</td><td>Check this option if you want to enable cell edit.</td></tr><tr><td>Hide Field Column</td><td>Boolean</td><td>The Pivot Grid is able to display multiple fields. To distinguish the fields we have an extra column containing the field name. Check this field to hide the field name.</td></tr><tr><td>Hide Grand Total</td><td>Boolean</td><td>Check this option if you want to hide the field column.</td></tr><tr><td>Show Header Groups</td><td>Boolean</td><td>Check this option if you want to show header groups.</td></tr><tr><td>Full Record Creation</td><td>Boolean</td><td><p>Check this option if you wish to create a full record instead of using a quick action.</p><p>If this option is activated, the user will be able to create a record using the assigned layout when he clicks on the ‘<strong>Create New Record</strong>’ button.</p></td></tr><tr><td>Default Values</td><td>String</td><td>JSON string to initialize a new object created from the pivot grid. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Hidden Fields</td><td>String</td><td><p>',' separated list of hidden fields for modal creation. When a user creates a new record, hidden fields will be defaulted but not displayed to the end-user (RecordTypeId for instance).</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Search Fields</td><td>String</td><td>',' separated search fields</td></tr><tr><td>Wildcard Search</td><td>Boolean</td><td>Use Wildcard Search</td></tr><tr><td>Grid Style</td><td>String</td><td><p>JSON string to override the column's style. Don’t forget __c for custom fields. This property can be used to default the width, the text alignment or wrapping for a specific column:</p><p></p><p><strong>To set the style of the header:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__header": "height:4rem;whiteSpace:normal"
}
</code></pre><p><strong>To set X Column style:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__xcolumn": "width:150px;cellcontent:wrap"
}
</code></pre><p><strong>To set Field Column style:</strong></p><pre class="language-json"><code class="lang-json">{
    "gm__field": "width:150px;cellcontent:wrap"
}
</code></pre><p><strong>To set Total Column style  :</strong> </p><pre class="language-json"><code class="lang-json">{
    "gm__total": "width:150px;"
}
</code></pre><p><strong>To set any Y Column style:</strong></p><pre class="language-json"><code class="lang-json">{
    "$YColumnName": "width:200px;cellcontent:wrap"
}
</code></pre><p><strong>To set the alignment for any V Column:</strong></p><pre class="language-json"><code class="lang-json">{
    "$VColumnName": "text-align:left"
}
</code></pre></td></tr><tr><td>Frozen Columns</td><td>Integer</td><td># of columns to freeze at startup. Note that the Y Columns and Field Column will be always frozen.</td></tr><tr><td>Total Color</td><td>String</td><td>Total row text color</td></tr><tr><td>Total Background</td><td>String</td><td>Total row background color</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid.</td></tr><tr><td>Show Column Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid columns.</td></tr><tr><td>Cell Coloring</td><td>String</td><td><p>JSON conditions for cells coloring. You can define for each field displayed in the grid the coloring and the corresponding condition. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></p><p></p><p>Both V Columns and Y Columns can be colored. See the example below:</p><pre class="language-json"><code class="lang-json">{
    "gmpkg__Net_Revenue__c": [
        {
            "color": "#A9E494",
            "exp": {
                "gmpkg__Invest__c": {
                    "operator": ">=",
                    "value": "-1000000"
                }
            }
        }
    ],
    "gmpkg__Opportunity__r.StageName": [
        {
            "color": "#f5a442",
            "exp": {
                "gmpkg__Opportunity__r.StageName": {
                    "operator": "=",
                    "value": "Needs Analysis"
                }
            }
        }
    ]
}
</code></pre></td></tr><tr><td>Custom Field Labels</td><td>String</td><td>{"name:label"} custom field labels map.</td></tr><tr><td>Lookup Fields Options</td><td>String</td><td>JSON options for lookup fields for V Columns. Ex. {apiName : {titleField : value, subTitleField : value}}</td></tr><tr><td>ReadOnly Fields</td><td>String</td><td>',' separated list of read-only fields. The user will not be able to edit these fields the same as read-only fields on the page layout. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a>.</td></tr><tr><td>Actions</td><td>String</td><td><p>JSON string to initialize the list of available actions on each record.</p><p>Custom actions are available on each tab as toolbar. You can leverage your existing quick actions.</p><p>The configuration wizard can be used to build the list of actions. See Actions Configuration</p></td></tr><tr><td>Custom Visible Actions</td><td>Boolean</td><td>#of visible custom actions.</td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td>Use buttons for actions instead of icons.</td></tr><tr><td>Enable Refresh View</td><td>Boolean</td><td>Check this option if you want to refresh the view after an update.</td></tr><tr><td>Default Mode</td><td>String</td><td><p>String to define the initial display mode of the grid (<strong>edit</strong> | <strong>read</strong>). </p><p></p><p>If this property is set to <strong>edit</strong>, the grid is displayed in edit in the first load of the page.</p></td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FieldSetPivotGridComponent.design" %}
{% code fullWidth="false" %}

```xml
<design:component label="GM - FieldSet Pivot">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedObjectName" label="Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="fieldSetName" label="Field Set" 
                      description="FieldSet name or ',' separated list of fields to display"/> 
    <design:attribute name="jsonFormulas" label="Formula Columns" 
                      description="Json string to define formula columbs. Use the configurations wizard to produce the property value"/>     
    <design:attribute name="xJsonColumns" label="X Columns" 
                      description="X Columns API Name. Don’t forget __c for custom fields"/> 
    <design:attribute name="xsort" label="X Column Sort" 
                      description="The field to sort with to create the pivot header. X Column field will be user if empty"/>
    <design:attribute name="xorder" label="X Column Order" 
                      description="The order for X Colmun Sort (asc|desc). Keep it empty for asc or if X Column Sort is empty"/>                                            
    <design:attribute name="yJsonColumns" label="Y Columns" 
                      description="Y Columns API Name. Don’t forget __c for custom fields"/> 
    <design:attribute name="yHiddenColumns" label="Y Hidden Columns" 
                      description="Y Hidden Columns API Name. Don’t forget __c for custom fields"/> 
    <design:attribute name="vJsonColumns" label="Value Columns" 
                      description="list of columns to display/edit on the grid. Don’t forget __c for custom fields"/>                                                               
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>  
    <design:attribute name="pageSize" label="PageSize" 
                      description="The number of row to fetch per step"/>
    <design:attribute name="paginationEnabled" label="Enable Pagination" 
                      description="Check this option to enable pagination instead of scrolling. Note this option is not compatible with interactive filters"/>                          
    <design:attribute name="pagingFieldName" label="Paging Field Name" 
                      description="Paging field api name. Set this property to handle a custom pagination"/>
    <design:attribute name="pagingFilter" label="Paging Filter" 
                      description="Json string to define the paging filter. Set this property to handle a custom pagination"/>
    <design:attribute name="pagingSort" label="Paging Sort" 
                      description="The field list to set the paging sort. Set this property to handle a custom pagination"/>
    <design:attribute name="pagingOrder" label="Paging Order" 
                      description="Asc or Desc order for paging sort. Set this property to handle a custom pagination"/>
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Grid Height" 
                      description="Set the grid height"/>  
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>    
    <design:attribute name="aggregate" label="Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>    
    <design:attribute name="canUpdate" label="Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canDelete" label="Enable Delete Object" 
                      description="Check this option if you want to delete object"/>    
    <design:attribute name="canCreate" label="Enable Create Object" 
                      description="Check this option if you want to create object"/>    
    <design:attribute name="canClone" label="Enable Clone Object" 
                      description="Check this option if you want to clone objects"/>                      
    <design:attribute name="canFilter" label="Enable Filter Object" 
                      description="Check this option if you want to use filters"/>    
    <design:attribute name="canFreeze" label="Enable Freeze Columns" 
                      description="Check this option if you want to freeze columns"/>    
    <design:attribute name="canExport" label="Enable Export Object" 
                      description="Check this option if you want to export objects"/> 
    <design:attribute name="canImport" label="Enable Import Object" 
                      description="Check this option if you want to import CSV files"/>                             
    <design:attribute name="canCollapse" label="Enable Grid Collapse" 
                      description="Check this option if you want to enable Grid collapse"/>        
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>                      
    <design:attribute name="canDragToFill" label="Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>    
    <design:attribute name="canInlineEditCell" label="Enable Cell Edit" 
                      description="Check this option if you want to enable cell edit"/>                              
    <design:attribute name="noFieldColumn" label="Hide Field Column" 
                      description="Check this option if you want to hide field column"/>  
    <design:attribute name="noGrandTotal" label="Hide Grand Total" 
                      description="Check this option if you want to hide grand total"/>   
    <design:attribute name="showHeaderGroups" label="Show Header Groups" 
                      description="Check this option if you want to show header groups"/>                                                                                                                                                                          
    <design:attribute name="fullRecordCreation" label="Full Record Creation" 
                      description="Check this option if you want to create a full record"/>                                    
    <design:attribute name="defaultValues" label="Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"                       
                      description="',' separated list of hidden fields for modal creation"/>   
    <design:attribute name="jsonSearchFields" label="Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="style" label="Grid Style" 
                      description="Set the pivot grid style(header width, xcolumn width, total width...)"/>    
    <design:attribute name="frozenColumns" label="Frozen Columns" 
                      description="# of columns to freeze"/>                            
    <design:attribute name="TotalColor" label="Total Color" 
                      description="Total row color"/>  
    <design:attribute name="TotalBgColor" label="Total Background" 
                      description="Total row background color"/> 
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/>
    <design:attribute name="showColumnBorder" label="Show Column Border" 
                      description="Show Column Border"/>          
    <design:attribute name="coloring" label="Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="fieldLabels" label="Custom Field Labels" 
                      description="{name:label} custom field labels map"/>                                                
    <design:attribute name="readOnlyFields" label="ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>    
    <design:attribute name="lookupOptions" label="Lookup Fields Options" 
                      description="JSON options for lookup fields for V Columns. Ex. {apiName : {titleField : value, subTitleField : value}}"/>                                                     
    <design:attribute name="jsonActions" label="Actions" 
                      description="Json string to initialize the list of available custom actions"/>
    <design:attribute name="visibleActions" label="Custom Visible Actions" 
                      description="# of visible custom actions"/>                      
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>    
    <design:attribute name="enableRefreshView" label="Enable Refresh View" 
                      description="Check this option if you want to refresh the view after an update"/>
    <design:attribute name="displayMode" label="Default Mode" 
                      description="Default execution mode : read | edit"/>                                           
</design:component>
```

{% endcode %}
{% endtab %}
{% endtabs %}


# GM - Kanban Board

(gmpkg/kanbanStageListLWC)

## **Documentation** <a href="#documentation" id="documentation"></a>

**GridMate’s Kanban Board** component is a highly customizable tool designed to enhance workflow management. It allows users to track progress and perform quick updates without navigating away from the page. This component is ideal for managing tasks in a visual format, making it easier to interact with data in one place.

**Use case:** Display opportunity Kanban board based on the opportunity object. see [**GM - Kanban Board**](https://app.gitbook.com/o/-MExKsPRmZY_gq8CXAcj/s/-MEsSbGy_U_OhthKUpxu/~/changes/473/product-tour/kanban-board)

## **Specification**

<table data-full-width="true"><thead><tr><th width="196.98297119140625">Property</th><th width="139.61517333984375">Type</th><th>Description</th></tr></thead><tbody><tr><td>Custom Label</td><td>String</td><td>Set the label of the kanban.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the kanban icon. All lightning icons are supported.</td></tr><tr><td>Object Name</td><td>String</td><td>The name of the object to display (e.g., Opportunity).</td></tr><tr><td>Target Object Name</td><td>String</td><td>The name of the object to display if the kanban is shown on a record page.</td></tr><tr><td>Stage Field</td><td>String</td><td>The stage field to use for the kanban.</td></tr><tr><td>Stage Values</td><td>String</td><td>JSON string defining the subset of stage values to use within the kanban.</td></tr><tr><td>Title Field</td><td>String</td><td>The title field to use for each kanban card's title.</td></tr><tr><td>Object Fields</td><td>String</td><td>A comma-separated list of detail fields for the cards.</td></tr><tr><td>Row Limit</td><td>Integer</td><td>The maximum number of rows to fetch from the specified object.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string defining filter criteria. Ex. <code>{'StageName':'Needs Analysis'}.</code></td></tr><tr><td>Sort</td><td>String</td><td>The field list to sort the data.</td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting.</td></tr><tr><td>Enable Create Object</td><td>Boolean</td><td>Check to enable the creation of new objects from the kanban.</td></tr><tr><td>Enable Update Object</td><td>Boolean</td><td>Check to enable updates to existing objects.</td></tr><tr><td>Enable Mass Update</td><td>Boolean</td><td>Check to allow bulk updates to existing objects.</td></tr><tr><td>Enable Delete Object</td><td>Boolean</td><td>Check to allow deletion of objects from the kanban.</td></tr><tr><td>Enable Mass Delete</td><td>Boolean</td><td>Check to allow bulk deletion of objects.</td></tr><tr><td>Aggregate</td><td>String</td><td>JSON string to define aggregate fields. Ex. <code>{'Amount':'sum'}</code> to sum amounts of opportunities.</td></tr><tr><td>Actions</td><td>String</td><td>JSON string to initialize the list of available actions, The Kanban Board supports Quick Actions, Global Actions, and calling Flows.</td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td>Use buttons for actions instead of icons.</td></tr><tr><td>Custom Visible Actions</td><td>Integer</td><td>Number of visible custom actions.</td></tr><tr><td>Record Actions</td><td>String</td><td>JSON string to initialize the list of available record actions.</td></tr><tr><td>Stage States</td><td>String</td><td>JSON Stage States configuration to control the behavior when the user move a card.</td></tr><tr><td>Popover Fields</td><td>String</td><td>Popover Fields to display</td></tr><tr><td>Popover Columns #</td><td>String</td><td># Of Popover Columns</td></tr><tr><td>Card Coloring</td><td>String</td><td>JSON conditions for card coloring based on defined metrics.</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option to add a border to the kanban.</td></tr><tr><td>Density</td><td>String</td><td>Component density: comfy or compact.</td></tr><tr><td>Board Height</td><td>Integer</td><td>Set the board height in pixels.</td></tr></tbody></table>

## **API Reference** <a href="#api-reference" id="api-reference"></a>

{% code fullWidth="true" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - Kanban Board</masterLabel>
    <description>GM - Kanban Board</description>
    <targets>
        <target>lightning__AppPage</target>
        <target>lightning__RecordPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__AppPage,lightning__RecordPage,lightning__HomePage">
            <property
                name="displayLabel"
                type="String"
                label="Custom Label"
                description="Set the label of the kanban"
            />
            <property
                name="customIcon"
                type="String"
                label="Custom Icon"
                description="Customize the kanban icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"
            />

            <property
                name="objectApiName"
                type="String"
                label="Object Name"
                description="The name of the object to display. Ex. Opportunity."
            />
            <property
                name="sobjectName"
                type="String"
                label="Target Object Name"
                description="The name of the object to display if the kanban is displayed on a record page. Ex. Opportunity."
            />
            <property
                name="stageField"
                type="String"
                label="Stage Field"
                description="The stage field to use for the kanban"
            />
            <property
                name="stageValues"
                type="String"
                label="Stage Values"
                description="JSON stage values. The subset of values to use."
            />
            <property
                name="titleField"
                type="String"
                label="Title Field"
                description="The title field to use for the card title"
            />
            <property
                name="jsonObjectFields"
                type="String"
                label="Object Fields"
                description="',' separated list of detail fields"
            />

            <property
                name="rowLimit"
                type="Integer"
                label="Row Limit"
                description="The maximum number of row to fetch"
            />
            <property
                name="filterBy"
                type="String"
                label="Filter"
                description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"
            />
            <property
                name="sortBy"
                type="String"
                label="Sort"
                description="The field list to sort the data. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"
            />
            <property name="orderBy" type="String" label="Order" description="Asc or Desc order for sorting" />

            <property
                name="canCreate"
                type="Boolean"
                label="Enable Create Object"
                description="Check this option if you want to create object"
            />

            <property
                name="canEdit"
                type="Boolean"
                label="Enable Update Object"
                description="Check this option if you want to update object"
            />

            <property
                name="canMassUpdate"
                type="Boolean"
                label="Enable Mass Update"
                description="Check this option if you want to mass update"
            />

            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete Object"
                description="Check this option if you want to delete object"
            />

            <property
                name="canMassDelete"
                type="Boolean"
                label="Enable Mass Delete"
                description="Check this option if you want to mass delete"
            />

            <property
                name="jsonAggregate"
                type="String"
                label="Aggregate"
                description="Json string to define aggregate fields. Ex. {'Amount':'sum'} to sum the amount of opportunities"
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions"
            />
            <property
                name="buttonActions"
                type="Boolean"
                label="Show Actions as Buttons"
                description="Use buttons for actions instead of icons"
            />
            <property
                name="visibleActions"
                type="Integer"
                label="Custom Visible Actions"
                description="# of visible custom actions"
            />
            <property
                name="jsonRecordActions"
                type="String"
                label="Record Actions"
                description="Json string to initialize the list of available record actions"
            />
            <property
                name="jsonStageStates"
                type="String"
                label="Stage States"
                description="JSON Stage States configuration to control the behavior when the user move a card."
            />
            <property
                name="jsonPopoverFields"
                type="String"
                label="Popover Fields"
                description="Popover Fields to display"
            />
            <property
                name="popoverColumns"
                type="Integer"
                label="Popover Columns #"
                description="# Of Popover Columns"
            />

            <property
                name="jsonCardColoring"
                type="String"
                label="Card Coloring"
                description="JSON conditions for cards coloring"
            />

            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
            <property name="density" type="String" label="Density" description="Component density : comfy | compact" />
            <property name="height" type="Integer" label="Board Height" description="Set the board height in px" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endcode %}


# GM - Compact Calendar

(gmpkg:compactCalendarLWC)

## **Documentation**

**GM - Compact Calendar** component is used to display the **Event** and **Task** or any object as activity on the Calendar.

**Use case:** Display the **Event** and **Task** object as activities on the Calendar using the compact calendar. See [**GM - Compact Calendar.**](/product-tour/compact-calendar)

## **Specification**

<table data-full-width="true"><thead><tr><th width="170">Property</th><th width="132.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Title</td><td>String</td><td>The title of the <strong>Compact Calendar</strong>.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the data grid icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Json Config</td><td>Json</td><td>The JSON configuration describes the calendar setup, including the object API name, date fields, and popover fields. <code>backgroundColor</code> accepts a fixed colour or a JSON string of coloring rules; a rule's <code>color</code> may be <code>$record.FieldApiName</code>.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="compactCalendarLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>60.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - Compact Calendar</masterLabel>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property name="title" type="String" label="Title" description="Calendar Title" />
            <property name="customIcon" type="String" label="Custom Icon" description="Calendar Custom Icon" />
            <property name="jsonConfig" type="String" label="Json Config" description="Json Calendar Configuration" />
            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}


# GM - Multi Calendar

(gmpkg:CalendarComponent)

## **Documentation**

**GM - Multi Calendar** component is used to display a calendar view to easily handle task/event assignment for multiple resources. The component display horizontal time-axis and resources to assign as rows. Activities will be created, edited or deleted from the calendar cells. The component supports activities drag & drop like any calendar app.

With this component, we can display multiple objects on the same view to have 360 view of team's activity.

**Use case:** Display a calendar view for a specific team to manage event and tasks for a specific project.

## **Specification**

<table data-full-width="true"><thead><tr><th width="211.33333333333331">Property</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>Custom Label</td><td>String</td><td>Set the label of the calendar.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the calendar icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Calendar Height</td><td>Integer</td><td><p>Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.</p><p>If the value is set 9999, The calendar will use the remaining space on the page even if the user resizes the window. This behavior is relevant to build a responsive app page.</p></td></tr><tr><td>Calendar Style</td><td>String</td><td><p>CSS hooks to override the style of the calendar. The properties are available: the minimum activity cell width and the assignee width. See example below:</p><p><code>cell-min-width:10rem;col-header-width:10rem;</code></p></td></tr><tr><td># Of Visible Activities</td><td>Integer</td><td><p>Set the number of visibles activities (3 by default).</p><p>Extra activities will be displayed in the extra wrapper when the user click on link.</p><p>By setting the number if visible activities, we can control the height of the rows.</p></td></tr><tr><td>Default View</td><td>String</td><td><p>Calendar default view : <strong>daily</strong> | <strong>weekly | biweekly | monthly | quarterly</strong>.</p><p>The user can still change the view using the <strong>view switcher</strong> when the calendar is rendered.</p></td></tr><tr><td>Enable 2 Weeks View</td><td>Boolean</td><td><p>Check this option to add the <strong>2 Weeks</strong> view to the view switcher (off by default).</p><p>The view covers 14 days starting on the <strong>Week Start Day</strong>. Next/Previous move a full two-week period.</p></td></tr><tr><td>Week Start Day</td><td>Integer</td><td>Week start day from 0 to 6. 0 is Monday.</td></tr><tr><td>Day Start Hour</td><td>Integer</td><td>Day start hour from 0 to 11.</td></tr><tr><td>Skip Night Hours</td><td>Boolean</td><td>Check this options to skip the night hours (12 hours) when the user clicks Next/Prev.</td></tr><tr><td>Year Start</td><td>String</td><td>Set the start of the year (month). Used only for quarterly view</td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td>Check this option if you wish to display actions as buttons instead of icons.</td></tr><tr><td><strong>Assignee</strong></td><td></td><td></td></tr><tr><td>Assignee Object*</td><td>String</td><td>The name of the assignee object to display. Don’t forget __c for custom objects.</td></tr><tr><td>Assignee ListView*</td><td>String</td><td>The ListView API Name of the assignee object to display. The component will use the ListView filter to fetch the relevant records.</td></tr><tr><td>Available Assignee ListView(s)</td><td>String</td><td>',' Separated list of assignee ListView(s). The user will be able to switch between different ListView(s) to streamline the assignment process.</td></tr><tr><td>Assignee Filter*</td><td>String</td><td><p>JSON string to define filter criteria. Don’t forget __c for custom fields.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>filter</strong> property for more details.</p></td></tr><tr><td>Assignee Sort</td><td>String</td><td><p>The field list to sort assignee. This field is used only for the initial load.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>sort</strong> property for more details.</p></td></tr><tr><td>Assignee Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value <strong>asc</strong>. For descending enter the value <strong>desc.</strong></td></tr><tr><td>Assignee Row Limit</td><td>Integer</td><td>The maximum number of assignee to fetch. The component will never go beyond this number of records. The default value is 100.</td></tr><tr><td>Assignee Title Field*</td><td>String</td><td>Set the assignee title field to display on the row header. Use __c for custom fields.</td></tr><tr><td>Assignee SubTitle Field</td><td>String</td><td>Set the assignee sub title field to display on the row header. Use __c for custom fields.</td></tr><tr><td>Assignee Popover Fields</td><td>String</td><td>',' separated list of fields to display. These fields are used when the user hover on a specific assignee.</td></tr><tr><td>Assignee Popover Columns #</td><td>Number</td><td>The number of columns to display the assignee detail when the user hover on a specific assignee.</td></tr><tr><td>Assignee Icon</td><td>String</td><td>The icon to use for the assignee object.</td></tr><tr><td>Assignee Label</td><td>String</td><td>Override the assignee label instead of using the object label.</td></tr><tr><td><strong>Activity</strong></td><td></td><td></td></tr><tr><td>Activity Object*</td><td>String</td><td>The name of the activity object to display. Don’t forget __c for custom objects.</td></tr><tr><td>Activity ListView*</td><td>String</td><td>The ListView API Name of the activity object to display. The component will use the ListView filter to fetch the relevant records.</td></tr><tr><td>Activity Title Field*</td><td>String</td><td>Set the title field to display for an activity. Use __c for custom fields.</td></tr><tr><td>Activity SubTitle Field</td><td>String</td><td>Set the sub title field to display for an activity. Use __c for custom fields.</td></tr><tr><td>Activity Date Field Name</td><td>String</td><td>Set the activity date field for an activity. Use __c for custom fields.</td></tr><tr><td>Activity From Date Field Name</td><td>String</td><td>Set the activity from date field for an activity. This field is required when dealing with datetimes. Use __c for custom fields.</td></tr><tr><td>Activity End Date Field Name</td><td>String</td><td>Set the activity end date field for an activity. This field is required when dealing with datetimes. Use __c for custom fields.</td></tr><tr><td>Activity User Id Field Name</td><td>String</td><td>Set the used Id field for an activity. Use __c for custom fields.</td></tr><tr><td>Activity Aggregations</td><td>String</td><td>Json string to define the aggregated activity fields</td></tr><tr><td>Activity Default Values</td><td>String</td><td><p>JSON string to initialize a new record created from the calendar. Use __c for custom fields.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>default values</strong> property for more details.</p></td></tr><tr><td>Hidden Fields</td><td>String</td><td><p>',' separated list of hidden fields for modal creation. When a user creates a new record, hidden fields will be defaulted but not displayed to the end-user (RecordTypeId for instance).</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>hidden fields</strong> property for more details.</p></td></tr><tr><td>Activity Popover Fields</td><td>String</td><td>',' separated list fields to display. These fields are used when the user hover on a specific activity.</td></tr><tr><td>Activity Popover Columns #</td><td>Number</td><td>The number of columns to display the activity detail when the user hover on a specific record.</td></tr><tr><td>Activity Coloring</td><td>String</td><td><p>JSON conditions for cells coloring. You can define a list of colorings and the corresponding conditions.</p><pre class="language-json"><code class="lang-json">[
    {
        "color": "#60ace6",
        "exp": {
            "Subject": {
                "operator": "=",
                "value": "Email"
            }
        }
    },
    {
        "color": "#8cedbb",
        "exp": {
            "Subject": {
                "operator": "=",
                "value": "Meeting"
            }
        }
    }
]
</code></pre><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>cell coloring fields</strong> property for more details.</p></td></tr><tr><td>Activity Actions</td><td>String</td><td>Json string to initialize the list of available actions for an activity . See the <a href="/advanced-guides/actions-library#custom-actions">actions configuration example</a></td></tr><tr><td>Activity Icon</td><td>String</td><td>The icon to use for the activity object.</td></tr><tr><td>Activity Label</td><td>String</td><td>Override the activity label instead of using the object label.</td></tr><tr><td>Extra Activities</td><td>String</td><td><p>JSON string to add extra activities. The component is able to display multiple activity types on the same calendar as long as they belong to the same object.</p><p>As an <a href="/product-tour/multi-calendar-in-action#activity-configuration">example</a> we can build a calendar to display Events and Tasks assigned to a list of contacts. See <a href="/troubleshooting/config-samples/calendar-extra-activities">configuration example</a>.</p></td></tr><tr><td><strong>Permissions</strong></td><td></td><td></td></tr><tr><td>Enable Update Activity</td><td>Boolean</td><td>Check this option to allow the end-user to edit activities.</td></tr><tr><td>Enable Delete Activity</td><td>Boolean</td><td>Check this option to allow the end-user to delete activities.</td></tr><tr><td>Enable Create Activity</td><td>Boolean</td><td>Check this option to allow the end-user to create activities.</td></tr><tr><td>Enable Export Activity</td><td>Boolean</td><td>Check this option to allow the end-user to export activities.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="CalendarComponent.design" %}

```xml
<design:component label="GM - Multi Calendar">
    <!-- UI props-->
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Set the label of calendar"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the calendar icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Calendar Height" 
                      description="Set the calendar height"/>   
    <design:attribute name="style" label="Calendar Style" 
                      description="Set the calendar style(header width, cell width...)"/>   
    <design:attribute name="visibleActivities" label="# Of Visible Activities" 
                      description="Max. # of visible activities"/>                            
    <design:attribute name="timelineView" label="Default View" 
                      description="Set the default view (daily|weekly|biweekly|monthly|quarterly)"/>
    <design:attribute name="enableBiweeklyView" label="Enable 2 Weeks View"
                      description="Check this option to add the 2 Weeks (biweekly) view to the view switcher"/>
    <design:attribute name="startWeek" label="Week Start Day" 
                      description="Set the start day of the week. 0 is Sunday"/> 
    <design:attribute name="startTime" label="Day Start Hour" 
                      description="Set the start of  the day. 8 is the default value"/> 
    <design:attribute name="skipNightHours" label="Skip Night Hours" 
                      description="Skip Nigh Hours"/>                            
    <design:attribute name="startYear" label="Year Start" 
                      description="Set the start of the year (month). Used only for quarterly view"/>                                                                   
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>  
                      
    <!-- Permissions props-->
    <design:attribute name="canUpdate" label="Enable Update Activity" 
                      description="Check this option if you want to update activities"/>
    <design:attribute name="canDelete" label="Enable Delete Activity" 
                      description="Check this option if you want to delete activities"/>
    <design:attribute name="canCreate" label="Enable Create Activity" 
                      description="Check this option if you want to create activities"/>  
    <design:attribute name="canExport" label="Enable Export Activity" 
                      description="Check this option if you want to export activities"/>                          
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>   

    <!-- Assignee props-->
    <design:attribute name="userObjectName" label="Assignee Object" 
                      description="Assignee Object"/>        
    <design:attribute name="userListViewName" label="Assignee ListView" 
                      description="Assignee ListView"/>     
    <design:attribute name="userListViewNames" label="Assignee ListView(s)" 
                      description="Available Assignee ListView(s)"/>     
    <design:attribute name="userFilter" label="Assignee Filter" 
                      description="Assignee Filter"/>  
    <design:attribute name="userSort" label="Assignee Sort" 
                      description="Assignee Sort"/>  
    <design:attribute name="userOrder" label="Assignee Order" 
                      description="Assignee Order"/>  
    <design:attribute name="userRowLimit" label="Assignee Row Limit" 
                      description="Assignee Row Limit"/>                           
    <design:attribute name="userPageSize" label="Assignee Page Size" 
                      description="Assignee Page Size"/>                      
    <design:attribute name="userTitleFieldName" label="Assignee Title Field" 
                      description="Assignee Title Field"/>  
    <design:attribute name="userSubTitleFieldName" label="Assignee SubTitle Field" 
                      description="Assignee SubTitle Field"/>      
    <design:attribute name="userPopoverFields" label="Assignee Popover Fields" 
                      description="Assignee Popover Fields to display"/>
    <design:attribute name="userPopoverColums" label="Assignee Popover Columns #" 
                      description="Assignee Popover Columns #"/>     
    <design:attribute name="assigneeIcon" label="Assignee Icon" 
                      description="Assignee Icon"/>                                                                                            
    <design:attribute name="assigneeLabel" label="Assignee Label" 
                      description="Assignee Label"/>                                                                      
    
    <!-- Activity props-->
    <design:attribute name="activityObjectName" label="Activity Object" 
                      description="Activity Object"/>  
    <design:attribute name="activityListViewName" label="Activity ListView" 
                      description="Activity ListView"/>     
    <design:attribute name="activityFilter" label="Activity Filter" 
                      description="Activity Filter"/>        
    <design:attribute name="activityTitleFieldName" label="Activity Title Field" 
                      description="Activity Title Field Name"/>     
    <design:attribute name="activitySubTitleFieldName" label="Activity Sub Title Field" 
                      description="Activity Sub Title Field Name"/>     
    <design:attribute name="activityDateFieldName" label="Activity Date Field" 
                      description="Activity Date Field Name"/>                               
    <design:attribute name="activityFromDateFieldName" label="Activity From Date Field" 
                      description="Activity From Date Field Name"/>     
    <design:attribute name="activityToDateFieldName" label="Activity To Date Field" 
                      description="Activity To Date Field Name"/>     
    <design:attribute name="activityUserIdFieldName" label="Activity Assignee Field" 
                      description="Activity Assignee Field Name"/>     
    <design:attribute name="aggregate" label="Activity Aggregations"
                      description="Json string to define the aggregated activity fields"/>  
    <design:attribute name="defaultValues" label="Activity Default Values" 
                      description="Json string to initialize a new activity created from the calendar. Don’t forget __c for custom fields"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"
                      description="',' separated list of hidden fields for activity creation. Reserved for future use"/>  
    <design:attribute name="activityPopoverFields" label="Activity Popover Fields" 
                      description="Activity Popover Fields to display"/>          
    <design:attribute name="activityPopoverColums" label="Activity Popover Columns #" 
                      description="Activity Popover Columns #"/>                                                                     
    <design:attribute name="activityColoring" label="Activity Coloring" 
                      description="Activity Coloring"/>
    <design:attribute name="activityActions" label="Activity Actions" 
                      description="Json string to initialize the list of available actions for an activity"/>
    <design:attribute name="activityIcon" label="Activity Icon" 
                      description="Activity Icon"/>
    <design:attribute name="activityLabel" label="Activity Label" 
                      description="Activity Label"/>

    <!-- Extra Activities -->
    <design:attribute name="extraActivities" label="Extra Activities" 
                      description="Extra Activities Configuration"/>
</design:component>
```

{% endtab %}
{% endtabs %}

## **Documentation**

**GM - Multi Calendar** component is used to display a calendar view to easily handle task/event assignment for multiple resources. The component display horizontal time-axis and resources to assign as rows. Activities will be created, edited or deleted from the calendar cells. The component supports activities drag & drop like any calendar app.

With this component, we can display multiple objects on the same view to have 360 view of team's activity.

**Use case:** Display a calendar view for a specific team to manage event and tasks for a specific project.

## **Specification**

<table data-full-width="true"><thead><tr><th width="211.33333333333331">Property</th><th width="144">Type</th><th>Description</th></tr></thead><tbody><tr><td>Custom Label</td><td>String</td><td>Set the label of the calendar.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the calendar icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Calendar Height</td><td>Integer</td><td><p>Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.</p><p>If the value is set 9999, The calendar will use the remaining space on the page even if the user resizes the window. This behavior is relevant to build a responsive app page.</p></td></tr><tr><td>Calendar Style</td><td>String</td><td><p>CSS hooks to override the style of the calendar. The properties are available: the minimum activity cell width and the assignee width. See example below:</p><p><code>cell-min-width:10rem;col-header-width:10rem;</code></p></td></tr><tr><td># Of Visible Activities</td><td>Integer</td><td><p>Set the number of visibles activities (3 by default).</p><p>Extra activities will be displayed in the extra wrapper when the user click on link.</p><p>By setting the number if visible activities, we can control the height of the rows.</p></td></tr><tr><td>Default View</td><td>String</td><td><p>Calendar default view : <strong>daily</strong> | <strong>weekly | biweekly | monthly | quarterly</strong>.</p><p>The user can still change the view using the <strong>view switcher</strong> when the calendar is rendered.</p></td></tr><tr><td>Enable 2 Weeks View</td><td>Boolean</td><td><p>Check this option to add the <strong>2 Weeks</strong> view to the view switcher (off by default).</p><p>The view covers 14 days starting on the <strong>Week Start Day</strong>. Next/Previous move a full two-week period.</p></td></tr><tr><td>Week Start Day</td><td>Integer</td><td>Week start day from 0 to 6. 0 is Monday.</td></tr><tr><td>Day Start Hour</td><td>Integer</td><td>Day start hour from 0 to 11.</td></tr><tr><td>Skip Night Hours</td><td>Boolean</td><td>Check this options to skip the night hours (12 hours) when the user clicks Next/Prev.</td></tr><tr><td>Year Start</td><td>String</td><td>Set the start of the year (month). Used only for quarterly view</td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td>Check this option if you wish to display actions as buttons instead of icons.</td></tr><tr><td><strong>Assignee</strong></td><td></td><td></td></tr><tr><td>Assignee Object*</td><td>String</td><td>The name of the assignee object to display. Don’t forget __c for custom objects.</td></tr><tr><td>Assignee ListView*</td><td>String</td><td>The ListView API Name of the assignee object to display. The component will use the ListView filter to fetch the relevant records.</td></tr><tr><td>Available Assignee ListView(s)</td><td>String</td><td>',' Separated list of assignee ListView(s). The user will be able to switch between different ListView(s) to streamline the assignment process.</td></tr><tr><td>Assignee Filter*</td><td>String</td><td><p>JSON string to define filter criteria. Don’t forget __c for custom fields.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>filter</strong> property for more details.</p></td></tr><tr><td>Assignee Sort</td><td>String</td><td><p>The field list to sort assignee. This field is used only for the initial load.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>sort</strong> property for more details.</p></td></tr><tr><td>Assignee Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value <strong>asc</strong>. For descending enter the value <strong>desc.</strong></td></tr><tr><td>Assignee Row Limit</td><td>Integer</td><td>The maximum number of assignee to fetch. The component will never go beyond this number of records. The default value is 100.</td></tr><tr><td>Assignee Title Field*</td><td>String</td><td>Set the assignee title field to display on the row header. Use __c for custom fields.</td></tr><tr><td>Assignee SubTitle Field</td><td>String</td><td>Set the assignee sub title field to display on the row header. Use __c for custom fields.</td></tr><tr><td>Assignee Popover Fields</td><td>String</td><td>',' separated list of fields to display. These fields are used when the user hover on a specific assignee.</td></tr><tr><td>Assignee Popover Columns #</td><td>Number</td><td>The number of columns to display the assignee detail when the user hover on a specific assignee.</td></tr><tr><td>Assignee Icon</td><td>String</td><td>The icon to use for the assignee object.</td></tr><tr><td>Assignee Label</td><td>String</td><td>Override the assignee label instead of using the object label.</td></tr><tr><td><strong>Activity</strong></td><td></td><td></td></tr><tr><td>Activity Object*</td><td>String</td><td>The name of the activity object to display. Don’t forget __c for custom objects.</td></tr><tr><td>Activity ListView*</td><td>String</td><td>The ListView API Name of the activity object to display. The component will use the ListView filter to fetch the relevant records.</td></tr><tr><td>Activity Title Field*</td><td>String</td><td>Set the title field to display for an activity. Use __c for custom fields.</td></tr><tr><td>Activity SubTitle Field</td><td>String</td><td>Set the sub title field to display for an activity. Use __c for custom fields.</td></tr><tr><td>Activity Date Field Name</td><td>String</td><td>Set the activity date field for an activity. Use __c for custom fields.</td></tr><tr><td>Activity From Date Field Name</td><td>String</td><td>Set the activity from date field for an activity. This field is required when dealing with datetimes. Use __c for custom fields.</td></tr><tr><td>Activity End Date Field Name</td><td>String</td><td>Set the activity end date field for an activity. This field is required when dealing with datetimes. Use __c for custom fields.</td></tr><tr><td>Activity User Id Field Name</td><td>String</td><td>Set the used Id field for an activity. Use __c for custom fields.</td></tr><tr><td>Activity Aggregations</td><td>String</td><td>Json string to define the aggregated activity fields</td></tr><tr><td>Activity Default Values</td><td>String</td><td><p>JSON string to initialize a new record created from the calendar. Use __c for custom fields.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>default values</strong> property for more details.</p></td></tr><tr><td>Hidden Fields</td><td>String</td><td><p>',' separated list of hidden fields for modal creation. When a user creates a new record, hidden fields will be defaulted but not displayed to the end-user (RecordTypeId for instance).</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>hidden fields</strong> property for more details.</p></td></tr><tr><td>Activity Popover Fields</td><td>String</td><td>',' separated list fields to display. These fields are used when the user hover on a specific activity.</td></tr><tr><td>Activity Popover Columns #</td><td>Number</td><td>The number of columns to display the activity detail when the user hover on a specific record.</td></tr><tr><td>Activity Coloring</td><td>String</td><td><p>JSON conditions for cells coloring. You can define a list of colorings and the corresponding conditions.</p><pre class="language-json"><code class="lang-json">[
    {
        "color": "#60ace6",
        "exp": {
            "Subject": {
                "operator": "=",
                "value": "Email"
            }
        }
    },
    {
        "color": "#8cedbb",
        "exp": {
            "Subject": {
                "operator": "=",
                "value": "Meeting"
            }
        }
    }
]
</code></pre><p>A rule's <code>color</code> can also be <code>$record.FieldApiName</code> to use the colour stored on the record.</p><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a> <strong>cell coloring fields</strong> property for more details.</p></td></tr><tr><td>Activity Actions</td><td>String</td><td>Json string to initialize the list of available actions for an activity . See the <a href="/advanced-guides/actions-library#custom-actions">actions configuration example</a></td></tr><tr><td>Activity Icon</td><td>String</td><td>The icon to use for the activity object.</td></tr><tr><td>Activity Label</td><td>String</td><td>Override the activity label instead of using the object label.</td></tr><tr><td>Extra Activities</td><td>String</td><td><p>JSON string to add extra activities. The component is able to display multiple activity types on the same calendar as long as they belong to the same object.</p><p>As an <a href="/product-tour/multi-calendar-in-action#activity-configuration">example</a> we can build a calendar to display Events and Tasks assigned to a list of contacts. See <a href="/troubleshooting/config-samples/calendar-extra-activities">configuration example</a>.</p></td></tr><tr><td><strong>Permissions</strong></td><td></td><td></td></tr><tr><td>Enable Update Activity</td><td>Boolean</td><td>Check this option to allow the end-user to edit activities.</td></tr><tr><td>Enable Delete Activity</td><td>Boolean</td><td>Check this option to allow the end-user to delete activities.</td></tr><tr><td>Enable Create Activity</td><td>Boolean</td><td>Check this option to allow the end-user to create activities.</td></tr><tr><td>Enable Export Activity</td><td>Boolean</td><td>Check this option to allow the end-user to export activities.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="CalendarComponent.design" %}

```xml
<design:component label="GM - Multi Calendar">
    <!-- UI props-->
    <design:attribute name="customLabel" label="Custom Label" 
                      description="Set the label of calendar"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the calendar icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="Calendar Height" 
                      description="Set the calendar height"/>   
    <design:attribute name="style" label="Calendar Style" 
                      description="Set the calendar style(header width, cell width...)"/>   
    <design:attribute name="visibleActivities" label="# Of Visible Activities" 
                      description="Max. # of visible activities"/>                            
    <design:attribute name="timelineView" label="Default View" 
                      description="Set the default view (daily|weekly|biweekly|monthly|quarterly)"/>
    <design:attribute name="enableBiweeklyView" label="Enable 2 Weeks View"
                      description="Check this option to add the 2 Weeks (biweekly) view to the view switcher"/>
    <design:attribute name="startWeek" label="Week Start Day" 
                      description="Set the start day of the week. 0 is Sunday"/> 
    <design:attribute name="startTime" label="Day Start Hour" 
                      description="Set the start of  the day. 8 is the default value"/> 
    <design:attribute name="skipNightHours" label="Skip Night Hours" 
                      description="Skip Nigh Hours"/>                            
    <design:attribute name="startYear" label="Year Start" 
                      description="Set the start of the year (month). Used only for quarterly view"/>                                                                   
    <design:attribute name="buttonActions" label="Show Actions as Buttons" 
                      description="Use buttons for actions instead of icons"/>  
                      
    <!-- Permissions props-->
    <design:attribute name="canUpdate" label="Enable Update Activity" 
                      description="Check this option if you want to update activities"/>
    <design:attribute name="canDelete" label="Enable Delete Activity" 
                      description="Check this option if you want to delete activities"/>
    <design:attribute name="canCreate" label="Enable Create Activity" 
                      description="Check this option if you want to create activities"/>  
    <design:attribute name="canExport" label="Enable Export Activity" 
                      description="Check this option if you want to export activities"/>                          
    <design:attribute name="canToggleFullscreen" label="Enable Toggle Fullscreen" 
                      description="Check this option if you want to enable toggle fullscreen"/>   

    <!-- Assignee props-->
    <design:attribute name="userObjectName" label="Assignee Object" 
                      description="Assignee Object"/>        
    <design:attribute name="userListViewName" label="Assignee ListView" 
                      description="Assignee ListView"/>     
    <design:attribute name="userListViewNames" label="Assignee ListView(s)" 
                      description="Available Assignee ListView(s)"/>     
    <design:attribute name="userFilter" label="Assignee Filter" 
                      description="Assignee Filter"/>  
    <design:attribute name="userSort" label="Assignee Sort" 
                      description="Assignee Sort"/>  
    <design:attribute name="userOrder" label="Assignee Order" 
                      description="Assignee Order"/>  
    <design:attribute name="userRowLimit" label="Assignee Row Limit" 
                      description="Assignee Row Limit"/>                           
    <design:attribute name="userPageSize" label="Assignee Page Size" 
                      description="Assignee Page Size"/>                      
    <design:attribute name="userTitleFieldName" label="Assignee Title Field" 
                      description="Assignee Title Field"/>  
    <design:attribute name="userSubTitleFieldName" label="Assignee SubTitle Field" 
                      description="Assignee SubTitle Field"/>      
    <design:attribute name="userPopoverFields" label="Assignee Popover Fields" 
                      description="Assignee Popover Fields to display"/>
    <design:attribute name="userPopoverColums" label="Assignee Popover Columns #" 
                      description="Assignee Popover Columns #"/>     
    <design:attribute name="assigneeIcon" label="Assignee Icon" 
                      description="Assignee Icon"/>                                                                                            
    <design:attribute name="assigneeLabel" label="Assignee Label" 
                      description="Assignee Label"/>                                                                      
    
    <!-- Activity props-->
    <design:attribute name="activityObjectName" label="Activity Object" 
                      description="Activity Object"/>  
    <design:attribute name="activityListViewName" label="Activity ListView" 
                      description="Activity ListView"/>     
    <design:attribute name="activityFilter" label="Activity Filter" 
                      description="Activity Filter"/>        
    <design:attribute name="activityTitleFieldName" label="Activity Title Field" 
                      description="Activity Title Field Name"/>     
    <design:attribute name="activitySubTitleFieldName" label="Activity Sub Title Field" 
                      description="Activity Sub Title Field Name"/>     
    <design:attribute name="activityDateFieldName" label="Activity Date Field" 
                      description="Activity Date Field Name"/>                               
    <design:attribute name="activityFromDateFieldName" label="Activity From Date Field" 
                      description="Activity From Date Field Name"/>     
    <design:attribute name="activityToDateFieldName" label="Activity To Date Field" 
                      description="Activity To Date Field Name"/>     
    <design:attribute name="activityUserIdFieldName" label="Activity Assignee Field" 
                      description="Activity Assignee Field Name"/>     
    <design:attribute name="aggregate" label="Activity Aggregations"
                      description="Json string to define the aggregated activity fields"/>  
    <design:attribute name="defaultValues" label="Activity Default Values" 
                      description="Json string to initialize a new activity created from the calendar. Don’t forget __c for custom fields"/>
    <design:attribute name="hiddenFields" label="Hidden Fields"
                      description="',' separated list of hidden fields for activity creation. Reserved for future use"/>  
    <design:attribute name="activityPopoverFields" label="Activity Popover Fields" 
                      description="Activity Popover Fields to display"/>          
    <design:attribute name="activityPopoverColums" label="Activity Popover Columns #" 
                      description="Activity Popover Columns #"/>                                                                     
    <design:attribute name="activityColoring" label="Activity Coloring" 
                      description="Activity Coloring"/>
    <design:attribute name="activityActions" label="Activity Actions" 
                      description="Json string to initialize the list of available actions for an activity"/>
    <design:attribute name="activityIcon" label="Activity Icon" 
                      description="Activity Icon"/>
    <design:attribute name="activityLabel" label="Activity Label" 
                      description="Activity Label"/>

    <!-- Extra Activities -->
    <design:attribute name="extraActivities" label="Extra Activities" 
                      description="Extra Activities Configuration"/>
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Single Calendar

(gmpkg/calendarAnyViewLWC)

## **Documentation**

The **Single Calendar** component enables users to easily manage and view schedules in one place. It features drag-and-drop support, conditional coloring, and filtering by criteria, making calendar management more efficient and visually engaging.

**Use case :** Setting up a calendar to visualize project tasks efficiently.

## **Specification**

<table data-full-width="true"><thead><tr><th width="335.3150634765625">Property</th><th width="194.8724365234375">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Calendar Label</td><td>String</td><td>Set the label of the calendar.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the calendar icon. All lightning icons are supported.</td></tr><tr><td>Default Calendar View</td><td>String</td><td>Set the default view (daily|weekly|monthly|schedule)</td></tr><tr><td>Calendar Height</td><td>Integer</td><td>Set the calendar height. Use 9999 for dynamic height.</td></tr><tr><td>Activity Object</td><td>String</td><td>Activity Object API Name. Don’t forget __c for custom objects.</td></tr><tr><td>Activity Title Field</td><td>String</td><td>Activity Title Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Sub Title Field</td><td>String</td><td>Activity Sub Title Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Date Field</td><td>String</td><td>Activity Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity From Date Field</td><td>String</td><td>Activity From Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity To Date Field</td><td>String</td><td>Activity To Date Field API Name. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Popover Fields</td><td>String</td><td>Activity Popover Fields to display. Keep it empty to use the compact layout.</td></tr><tr><td>Activity Popover Columns #</td><td>Integer</td><td>Activity Popover Columns #</td></tr><tr><td>Activity Filter</td><td>String</td><td>Activity Filter. The filter should be a JSON string.</td></tr><tr><td>Activity Default Values</td><td>String</td><td>JSON string to initialize a new activity created from the calendar. Don’t forget __c for custom fields.</td></tr><tr><td>Activity Coloring</td><td>String</td><td>Activity Coloring. The coloring should be a JSON string. A rule's <code>color</code> accepts <code>$record.FieldApiName</code> to use the colour stored on the record.</td></tr><tr><td>Activity Actions</td><td>String</td><td>JSON string to initialize the list of available actions for an activity.</td></tr><tr><td>Activity Icon</td><td>String</td><td>Activity Icon.</td></tr><tr><td>Activity Label</td><td>String</td><td>Activity Label.</td></tr><tr><td>Enable Create Activity</td><td>Boolean</td><td>Check this option if you want to create activities.</td></tr><tr><td>Enable Update Activity</td><td>Boolean</td><td>Check this option if you want to update activities.</td></tr><tr><td>Enable Delete Activity</td><td>Boolean</td><td>Check this option if you want to delete activities.</td></tr><tr><td>Enable Toggle Fullscreen</td><td>Boolean</td><td>Check this option if you want to enable toggle fullscreen.</td></tr><tr><td>Extra Activities</td><td>String</td><td>Extra Activities Config.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="calendarAnyViewLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>62.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <masterLabel>GM - Single Calendar</masterLabel>

    <targetConfigs>
        <targetConfig
            targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage,lightningCommunity__Default"
        >
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <!-- UI props-->
            <property
                name="customLabel"
                type="String"
                label="Calendar Label"
                description="Set the label of the calendar."
            />
            <property
                name="customIcon"
                type="String"
                label="Custom Icon"
                description="Customize the calendar icon. All lightning icons are supported"
            />
            <property
                name="defaultTimelineView"
                type="String"
                label="Default Calendar View"
                description="Set the default view (daily|weekly|monthly)"
            />
            <property
                name="height"
                type="Integer"
                label="Calendar Height"
                description="Set the calendar height. Use 9999 for dynamic height"
            />

            <!-- Activity props-->
            <property
                name="objectName"
                type="String"
                label="Activity Object"
                description="Activity Object API Name. Don’t forget __c for custom objects"
            />
            <property
                name="titleFieldName"
                type="String"
                label="Activity Title Field"
                description="Activity Title Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="subTitleFieldName"
                type="String"
                label="Activity Sub Title Field"
                description="Activity Sub Title Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="dateFieldName"
                type="String"
                label="Activity Date Field"
                description="Activity Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="fromDateFieldName"
                type="String"
                label="Activity From Date Field"
                description="Activity From Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="toDateFieldName"
                type="String"
                label="Activity To Date Field"
                description="Activity To Date Field API Name. Don’t forget __c for custom fields"
            />
            <property
                name="popoverFields"
                type="String"
                label="Activity Popover Fields"
                description="Activity Popover Fields to display. Keep it empty to use the compact layout"
            />
            <property
                name="popoverColums"
                type="Integer"
                label="Activity Popover Columns #"
                description="Activity Popover Columns #"
            />
            <property
                name="filter"
                type="String"
                label="Activity Filter"
                description="Activity Filter. The filter should be a JSON string"
            />
            <property
                name="defaultValues"
                type="String"
                label="Activity Default Values"
                description="Json string to initialize a new activity created from the calendar. Don’t forget __c for custom fields"
            />
            <property
                name="coloring"
                type="String"
                label="Activity Coloring"
                description="Activity Coloring. The coloring should be a JSON string"
            />
            <property
                name="actions"
                type="String"
                label="Activity Actions"
                description="Json string to initialize the list of available actions for an activity"
            />
            <property name="recordIcon" type="String" label="Activity Icon" description="Activity Icon" />
            <property name="recordLabel" type="String" label="Activity Label" description="Activity Label" />

            <!-- Permissions props-->
            <property
                name="canCreate"
                type="Boolean"
                label="Enable Create Activity"
                description="Check this option if you want to create activities"
            />
            <property
                name="canUpdate"
                type="Boolean"
                label="Enable Update Activity"
                description="Check this option if you want to update activities"
            />
            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete Activity"
                description="Check this option if you want to delete activities"
            />

            <property
                name="canToggleFullscreen"
                type="Boolean"
                label="Enable Toggle Fullscreen"
                description="Check this option if you want to enable toggle fullscreen"
            />

            <!-- Extra Activities -->
            <property
                name="extraActivities"
                type="String"
                label="Extra Activities"
                description="Extra Activities Config"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endtab %}
{% endtabs %}


# GM -  User Calendar

(gmpkg/userCalendarLWC)

## **Documentation**

GridMate provides the **GM – User Calendar**, a highly configurable calendar component that enables  users to manage standard and custom objects within a unified calendar view. It supports advanced filtering, color conditioning, and dynamic event rendering based on user interactions.

## **Specification**

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>UserCalendar Id or Developer Name</td><td>String</td><td>GM - UserCalendar Id or Developer Name to use</td></tr><tr><td>Calendar Height</td><td>Integer</td><td>Set the calendar height. Use 9999 for dynamic height</td></tr></tbody></table>

## **API Reference**

{% tabs %}
{% tab title="userCalendarLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - User Calendar</masterLabel>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <targetConfigs>
        <targetConfig
            targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage,lightningCommunity__Default"
        >
            <property
                name="userCalendarId"
                type="String"
                label="UserCalendar Id or Developer Name"
                description="GM - UserCalendar Id or Developer Name to use"
            />

            <property
                name="height"
                type="Integer"
                label="Calendar Height"
                description="Set the calendar height. Use 9999 for dynamic height"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endtab %}
{% endtabs %}


# GM - Gantt Chart

(gmpkg/ganttChartLwc)

## **Documentation** <a href="#documentation" id="documentation"></a>

**GM – Gantt Chart** component provides clarity to complex project timelines with numerous tasks, shifting deadlines, and overlapping dependencies. It helps you see the bigger picture while tracking details. With GridMate’s Gantt Chart, this clarity stays within your projects no need to switch between spreadsheets or external tools, as everything is connected to your live data.

## **Specification**

<table data-full-width="true"><thead><tr><th width="206.4388427734375">Property</th><th width="145.1551513671875">Type</th><th width="690.79541015625">Description</th></tr></thead><tbody><tr><td>Gantt Id</td><td>String</td><td>Identifier for the Gantt chart parent record.</td></tr><tr><td>Icon name</td><td>String</td><td>Icon displayed for the Gantt chart, You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Title</td><td>String</td><td>Title displayed at the top of the Gantt chart.</td></tr><tr><td>Can select</td><td>Boolean</td><td>Determines if tasks can be selected in the chart.</td></tr><tr><td>Can reorder</td><td>Boolean</td><td>Indicates if tasks can be reordered by user interaction.</td></tr><tr><td>Can edit</td><td>Boolean</td><td>Indicates if tasks can be edited directly in the chart.</td></tr><tr><td>Columns</td><td>String</td><td>Configuration for the columns displayed in the chart.</td></tr><tr><td>Relation config</td><td>String</td><td>JSON configuration that defines the data modal for the Gantt Chart. <a href="/product-tour/gantt-chart#gantt-chart-relation-configuration">JSON string configuration </a></td></tr><tr><td>Show only work hours</td><td>Boolean</td><td>Option to show only defined work hours in the chart.</td></tr><tr><td>Work day start</td><td>Integer</td><td>Hour at which the workday starts (1-24).</td></tr><tr><td>Work day end</td><td>Integer</td><td>Hour at which the workday ends (1-24).</td></tr><tr><td>Hour span</td><td>Integer</td><td>The time interval that defines a task slot’s length and the step size for moving tasks on the timeline (max 12h).</td></tr><tr><td>Work week start</td><td>Integer</td><td>The day the workweek starts, default is 1 (Monday).</td></tr><tr><td>Work week end</td><td>Integer</td><td>The day the workweek ends, default is 5 (Friday).</td></tr><tr><td>First day of week</td><td>Integer</td><td>Representation of the first day of the week (1-7).</td></tr><tr><td>Default displayed tasks</td><td>Integer</td><td>The number of tasks displayed by default.</td></tr><tr><td>Slot size</td><td>Integer</td><td>Width of each task slot in pixels.</td></tr><tr><td>Row height</td><td>Integer</td><td>Height of each row in pixels.</td></tr><tr><td>Left panel width (%)</td><td>Integer</td><td>Width of the left panel as a percentage of total width, up to 100%.</td></tr><tr><td>Right panel width (%)</td><td>Integer</td><td>Width of the right panel as a percentage of total width, up to 100%.</td></tr><tr><td>Default view</td><td>String</td><td>Initial view setting, e.g., “month” for monthly view.</td></tr></tbody></table>

## **API Reference** <a href="#api-reference" id="api-reference"></a>

{% tabs fullWidth="true" %}
{% tab title="ganttChartLwc.js-meta.xml" %}
{% code fullWidth="false" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <masterLabel>GM - Gantt Chart</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>

    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property name="parentRecordId" type="String" default="" label="Gantt id" />
            <property name="iconName" type="String" default="standard:chart" label="Icon name" />
            <property name="title" type="String" default="Gantt chart" label="Title" />
            <property name="canSelect" type="Boolean" default="false" label="Can select" />
            <property name="canReorder" type="Boolean" default="false" label="Can reorder" />
            <property name="canEdit" type="Boolean" default="false" label="Can edit" />
            <property name="columns" type="String" default="" label="Columns" />
            <property name="taskProps" type="String" label="Relation config" />
            <property name="showWorkHours" type="Boolean" default="false" label="Show only work hours" />
            <property name="workDayStart" type="Integer" default="8" label="Work day start" min="1" max="24" />
            <property name="workDayEnd" type="Integer" default="17" label="Work day end" min="1" max="24" />
            <property name="hourSpan" type="Integer" default="1" label="Hour span" max="12" />
            <property name="workWeekStart" type="Integer" default="1" label="Work week start" />
            <property name="workWeekEnd" type="Integer" default="5" label="Work week end" />
            <property name="firstDayOfWeek" type="Integer" default="1" label="First day of week" />
            <property name="displayedTasks" type="Integer" default="10" label="Default displayed tasks" />
            <property name="slotSize" type="Integer" default="200" label="Slot size" />
            <property name="rowHeight" type="Integer" default="40" label="Row height" />
            <property name="listPanelWidth" type="Integer" default="40" label="Left panel width (%)" max="100" />
            <property name="editorPanelWidth" type="Integer" default="30" label="Right panel width (%)" max="100" />
            <property name="defaultView" type="String" default="month" label="default view" />
            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>

        <targetConfig targets="lightningCommunity__Default">
            <property name="parentRecordId" type="String" default="" label="Gantt id" />
            <property name="iconName" type="String" default="standard:chart" label="Icon name" />
            <property name="title" type="String" default="Gantt chart" label="Title" />
            <property name="canSelect" type="Boolean" default="false" label="Can select" />
            <property name="canReorder" type="Boolean" default="false" label="Can reorder" />
            <property name="canEdit" type="Boolean" default="false" label="Can edit" />
            <property name="columns" type="String" default="" label="Columns" />
            <property name="taskProps" type="String" label="Relation config" />
            <property name="showWorkHours" type="Boolean" default="false" label="Show only work hours" />
            <property name="workDayStart" type="Integer" default="8" label="Work day start" min="1" max="24" />
            <property name="workDayEnd" type="Integer" default="17" label="Work day end" min="1" max="24" />
            <property name="hourSpan" type="Integer" default="1" label="Hour span" max="12" />
            <property name="workWeekStart" type="Integer" default="1" label="Work week start" />
            <property name="workWeekEnd" type="Integer" default="5" label="Work week end" />
            <property name="firstDayOfWeek" type="Integer" default="1" label="First day of week" />
            <property name="displayedTasks" type="Integer" default="10" label="Default displayed tasks" />
            <property name="slotSize" type="Integer" default="200" label="Slot size" />
            <property name="rowHeight" type="Integer" default="40" label="Row height" />
            <property name="listPanelWidth" type="Integer" default="40" label="Left panel width (%)" max="100" />
            <property name="editorPanelWidth" type="Integer" default="30" label="Right panel width (%)" max="100" />
            <property name="defaultView" type="String" default="month" label="default view" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endcode %}
{% endtab %}
{% endtabs %}


# GM - File Explorer

(gmpkg/fileExplorerLWC)

## **Documentation**

**GM - File Explorer** component is used to display the list of files related to a specific record ,It has the flexibility to change the display format according to the preference, such as Table, Tree, Gallery, or Carousel. Additionally, it has the ability to perform various actions on the files, including downloading and deleting them. This allows to manage and organize the attached files conveniently within the system.&#x20;

**Use case:** Display the  related files to an account.

<figure><img src="https://4046919449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MEsSbGy_U_OhthKUpxu%2Fuploads%2F4AgQCqzQmabNRow0haXk%2FGrid%20Explorer%20(11).png?alt=media&amp;token=f9350d05-f55d-41ac-b2fc-50f6584de0cb" alt=""><figcaption></figcaption></figure>

{% columns fullWidth="true" %}
{% column %}

1. Paste
2. Cut
3. Copy
4. Download
5. Delete
6. Carousel
   {% endcolumn %}

{% column valign="middle" %}
7\. Tree
8\. Table
9\. Gallery
10\. Reload
11\. Search Box

{% endcolumn %}
{% endcolumns %}

## **Specification**

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th width="396">Description</th></tr></thead><tbody><tr><td>Record Id</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Custom Label</td><td>String</td><td>Set the custom label. Keep it empty to use the default value.</td></tr><tr><td>Default View</td><td>String</td><td>Set the default view (table|tree|gallery|carousel).</td></tr><tr><td>Enable Delete</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to delete files.</td></tr><tr><td>Enable Hard Delete</td><td>Boolean</td><td>Check this option if you want to hard delete files</td></tr><tr><td>Enable Copy/Paste</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to copy/paste files from a record to another one.</td></tr><tr><td>Hide Topics</td><td>Boolean</td><td>Check this option if you want to hide topics.</td></tr><tr><td>Enable Search By Topics</td><td>Boolean</td><td>Check this option if you wish to enable the search by Topic.</td></tr><tr><td>Enable Update Topics</td><td>Boolean</td><td>Check this option if you wish to enable Topics update. This option is available only in the carousel view.</td></tr><tr><td>Collapse Carousel Split View</td><td>Boolean</td><td>Check this option if you want to collapse the carousel split view.</td></tr><tr><td>Disable Salesforce Upload</td><td>Boolean</td><td>Check this option to disable the file upload functionality to Salesforce.</td></tr><tr><td>Disable Download</td><td>Boolean</td><td>Check this option to prevent users from downloading files in the explorer.</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you want to show border.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Accepted Formats</td><td>String</td><td>Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png.</td></tr><tr><td>Content Library</td><td>String</td><td>Content Library Name. The library is optional.  When enabled, this option filters files to display only those within a specified library. Uploaded files will also be moved to that library. This feature is useful for organizing files by business unit, for example contracting, finance, hr...</td></tr><tr><td>Folder Name</td><td>String</td><td>Upload Folder Name. If a folder name is specified, uploaded files will be moved to that folder. Otherwise, this step is optional.</td></tr><tr><td>Actions</td><td>String</td><td>JSON string to initialize the list of available mass actions.</td></tr><tr><td>Height</td><td>Integer</td><td>Sets the height of the file explorer container.</td></tr><tr><td>Inline Preview</td><td>Boolean</td><td>Check this option to enable an inline preview of selected files.</td></tr><tr><td>Preview Position</td><td>String</td><td>Position of the inline preview (top|bottom|right|left).</td></tr><tr><td>Preview Height</td><td>Integer</td><td>Sets the height for the inline preview section.</td></tr><tr><td>Preview Width</td><td>Integer</td><td>Sets the width for the inline preview section.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="fileExplorerLWC.js-meta.xml" %}
{% code fullWidth="true" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - File Explorer</masterLabel>
    <description>GM - File Explorer</description>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <property
                name="customLabel"
                type="String"
                label="Custom Label"
                description="Set the custom label. Keep it empty to use the default value"
            />

            <property
                name="defaultView"
                type="String"
                label="Default View"
                description="Set the default view (table|tree|gallery|carousel)"
            />

            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete"
                description="Check this option if you want to delete links"
            />

            <property
                name="canHardDelete"
                type="Boolean"
                label="Enable Hard Delete"
                description="Check this option if you want to hard delete files"
            />

            <property
                name="canCopyPaste"
                type="Boolean"
                label="Enable Copy/Paste"
                description="Check this option if you want to copy/paste"
            />

            <property
                name="hideTopics"
                type="Boolean"
                label="Hide Topics"
                description="Check this option if you want to hide topics"
            />

            <property
                name="canSearchByTopics"
                type="Boolean"
                label="Enable Search By Topics"
                description="Check this option if you want to search by topics"
            />

            <property
                name="canUpdateTopics"
                type="Boolean"
                label="Enable Update Topics"
                description="Check this option if you want to update topics"
            />

            <property
                name="collapseSplitView"
                type="Boolean"
                label="Collapse Carousel Split View"
                description="Check this option if you want to collapse the carousel split view"
            />

            <property
                name="disableSfUpload"
                type="Boolean"
                label="Disable Salesforce Upload"
                description="Check this option if you want to disable upload to Salesforce"
            />

            <property
                name="disableDownload"
                type="Boolean"
                label="Disable Download"
                description="Check this option to disable file download in all views and preview modes"
            />

            <property
                name="showBorder"
                type="Boolean"
                label="Show Border"
                description="Check this option if you want to show Border."
            />

            <property
                name="jsonFilter"
                type="String"
                label="Filter"
                description="Json string to define filter criteria"
            />

            <property
                name="accept"
                type="String"
                label="Accepted Formats"
                description="Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png."
            />

            <property
                name="library"
                type="String"
                label="Content Library"
                description="Content Library Name. The library is optional."
            />

            <property
                name="folder"
                type="String"
                label="Folder Name"
                description="Upload Folder Name. The folder name is optional."
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions like Add file from S3"
            />

            <property
                name="height"
                type="Integer"
                label="Height"
                description="Set the container height. Applicable for Gallery/List/Tree view"
            />

            <property
                name="enhancedPreview"
                type="Boolean"
                label="Enhanced Preview"
                description="Check this option to enable enhanced preview"
            />

            <property
                name="inlinePreview"
                type="Boolean"
                label="Inline Preview"
                description="Check this option to enable inline preview. Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewPosition"
                type="String"
                label="Inline Preview Position"
                description="Inline preview position(top|bottom|right|left). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewHeight"
                type="Integer"
                label="Inline Preview Height"
                description="Inline preview height(px). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewWidth"
                type="Integer"
                label="Inline Preview Width"
                description="Inline preview width(%). Applicable for Gallery/List/Tree view"
            />

            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>
        <targetConfig targets="lightningCommunity__Default">
            <property
                name="recordId"
                type="String"
                label="recordId"
                description="recordId to use. Keep this empty if you want to use the current record"
            />

            <property
                name="customLabel"
                type="String"
                label="Custom Label"
                description="Set the custom label. Keep it empty to use the default value"
            />

            <property
                name="defaultView"
                type="String"
                label="Default View"
                description="Set the default view (table|tree|gallery|carousel)"
            />

            <property
                name="canDelete"
                type="Boolean"
                label="Enable Delete"
                description="Check this option if you want to delete"
            />

            <property
                name="canCopyPaste"
                type="Boolean"
                label="Enable Copy/Paste"
                description="Check this option if you want to copy/paste"
            />

            <property
                name="hideTopics"
                type="Boolean"
                label="Hide Topics"
                description="Check this option if you want to hide topics"
            />

            <property
                name="canSearchByTopics"
                type="Boolean"
                label="Enable Search By Topics"
                description="Check this option if you want to search by topics"
            />

            <property
                name="canUpdateTopics"
                type="Boolean"
                label="Enable Update Topics"
                description="Check this option if you want to update topics"
            />

            <property
                name="collapseSplitView"
                type="Boolean"
                label="Collapse Carousel Split View"
                description="Check this option if you want to collapse the carousel split view"
            />

            <property
                name="disableSfUpload"
                type="Boolean"
                label="Disable Salesforce Upload"
                description="Check this option if you want to disable upload to Salesforce"
            />

            <property
                name="disableDownload"
                type="Boolean"
                label="Disable Download"
                description="Check this option to disable file download in all views and preview modes"
            />

            <property
                name="showBorder"
                type="Boolean"
                label="Show Border"
                description="Check this option if you want to show Border."
            />

            <property
                name="jsonFilter"
                type="String"
                label="Filter"
                description="Json string to define filter criteria"
            />

            <property
                name="accept"
                type="String"
                label="Accepted Formats"
                description="Comma-separated list of file extensions that can be uploaded in the format .ext, such as .pdf,.jpg,.png"
            />

            <property
                name="library"
                type="String"
                label="Content Library"
                description="Content Library Name. The library is optional."
            />

            <property
                name="folder"
                type="String"
                label="Folder Name"
                description="Upload Folder Name. The folder name is optional."
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions like Add file from S3"
            />

            <property
                name="height"
                type="Integer"
                label="Height"
                description="Set the container height. Applicable for Gallery/List/Tree view"
            />

            <property
                name="enhancedPreview"
                type="Boolean"
                label="Enhanced Preview"
                description="Check this option to enable enhanced preview"
            />

            <property
                name="inlinePreview"
                type="Boolean"
                label="Inline Preview"
                description="Check this option to enable inline preview. Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewPosition"
                type="String"
                label="Inline Preview Position"
                description="Inline preview position(top|bottom|right|left). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewHeight"
                type="Integer"
                label="Inline Preview Height"
                description="Inline preview height(px). Applicable for Gallery/List/Tree view"
            />

            <property
                name="previewWidth"
                type="Integer"
                label="Inline Preview Width"
                description="Inline preview width(%). Applicable for Gallery/List/Tree view"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endcode %}
{% endtab %}
{% endtabs %}


# GM - Map List

(gmpkg/mapListLWC)

## **Documentation**

**GM - Map List** component enables users to conveniently map multiple records for any object (Standard or Custom). This component offers a unique blend of map view and list view, facilitating record filtering and action-taking capabilities.

**Use case:** Display list of Accounts on Google Maps and And filter Accounts by Billing Country. See [GM - Map List](/product-tour/map-list) .

## **Specification**

{% hint style="info" %}
The **GM - Google Map List** component requires either a street set of fields (Street, City, Postal Code, State, Country) or a geolocation (Latitude, Longitude) to map an given object.
{% endhint %}

{% hint style="warning" %}
If the map provider is OSM only geolocations (Latitude, Longitude) is supported.
{% endhint %}

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="mapListLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>64.0</apiVersion>
    <masterLabel>GM - Map List</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property
                name="mapProvider"
                type="String"
                label="Map Provider"
                description="Map Provider : (google | osm)"
            />

            <property name="objectName" type="String" label="Object Name" description="Object API Name" />
            <property name="customLabel" type="String" label="Custom Label" description="Custom Label" />
            <property name="filter" type="String" label="Filter" description="JSON Filters" />
            <property name="rowLimit" type="Integer" label="Row Limit" description="Max # of row to fetch" />

            <property name="streetField" type="String" label="Street Field" description="Street Field" />
            <property name="cityField" type="String" label="City Field" description="City Field" />
            <property name="postalCodeField" type="String" label="Postal Code Field" description="Postal Code Field" />
            <property name="stateField" type="String" label="State Field" description="State Field" />
            <property name="countryField" type="String" label="Country Field" description="Country Field" />

            <property name="latitudeField" type="String" label="Latitude Field" description="Latitude Field" />
            <property name="longitudeField" type="String" label="Longitude Field" description="Longitude Field" />

            <property name="titleField" type="String" label="Title Field" description="Title Field" />
            <property name="descriptionField" type="String" label="Popover Fields" description="Popover Fields" />
            <property name="detailFields" type="String" label="Detail Fields" description="Detail Fields" />

            <property
                name="searchFields"
                type="String"
                label="Search Fields"
                description="',' separated search fields"
            />
            <property
                name="canFilter"
                type="Boolean"
                label="Enable Filtering"
                description="Check this option if you want to use filters"
            />

            <property name="mapIcon" type="String" label="Marker Icon" description="Map Marker Icon" />
            <property name="listIcon" type="String" label="List Icon" description="Item List Icon" />

            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
            <property name="height" type="Integer" label="Map Height" description="Map Height" />

            <property
                name="colring"
                type="String"
                label="Marker Coloring"
                description="JSON Marker Coloring Configuration"
            />

            <property
                name="searchAround"
                type="String"
                label="Search Around"
                description="JSON Search Around Configuration"
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions"
            />

            <property
                name="jsonRecordActions"
                type="String"
                label="Record Actions"
                description="Json string to initialize the list of available record actions"
            />

            <property
                name="showClusters"
                type="Boolean"
                label="Show Clusters"
                description="Check this option if you want to show clusters"
            />

            <property
                name="wildCard"
                type="String"
                label="xxx(deprecated)"
                description="Deprecated. Ignore this property"
            />
            <property
                name="wildCardSearch"
                type="String"
                label="zzz(deprecated)"
                description="Deprecated. Ignore this property"
            />
        </targetConfig>
        <targetConfig targets="lightningCommunity__Default">
            <property
                name="mapProvider"
                type="String"
                label="Map Provider"
                description="Map Provider : (google | osm)"
            />

            <property name="objectName" type="String" label="Object Name" description="Object API Name" />
            <property name="customLabel" type="String" label="Custom Label" description="Custom Label" />
            <property name="filter" type="String" label="Filter" description="JSON Filters" />
            <property name="rowLimit" type="Integer" label="Row Limit" description="Max # of row to fetch" />

            <property name="streetField" type="String" label="Street Field" description="Street Field" />
            <property name="cityField" type="String" label="City Field" description="City Field" />
            <property name="postalCodeField" type="String" label="Postal Code Field" description="Postal Code Field" />
            <property name="stateField" type="String" label="State Field" description="State Field" />
            <property name="countryField" type="String" label="Country Field" description="Country Field" />

            <property name="latitudeField" type="String" label="Latitude Field" description="Latitude Field" />
            <property name="longitudeField" type="String" label="Longitude Field" description="Longitude Field" />

            <property name="titleField" type="String" label="Title Field" description="Title Field" />
            <property name="descriptionField" type="String" label="Description Field" description="Description Field" />
            <property name="detailFields" type="String" label="Detail Fields" description="Detail Fields" />

            <property
                name="searchFields"
                type="String"
                label="Search Fields"
                description="',' separated search fields"
            />
            <property
                name="canFilter"
                type="Boolean"
                label="Enable Filtering"
                description="Check this option if you want to use filters"
            />

            <property name="mapIcon" type="String" label="Marker Icon" description="Map Marker Icon" />
            <property name="listIcon" type="String" label="List Icon" description="Item List Icon" />

            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
            <property name="height" type="Integer" label="Map Height" description="Map Height" />

            <property
                name="colring"
                type="String"
                label="Marker Coloring"
                description="JSON Marker Coloring Configuration"
            />

            <property
                name="searchAround"
                type="String"
                label="Search Around"
                description="JSON Search Around Configuration"
            />

            <property
                name="jsonActions"
                type="String"
                label="Actions"
                description="Json string to initialize the list of available actions"
            />

            <property
                name="jsonRecordActions"
                type="String"
                label="Record Actions"
                description="Json string to initialize the list of available record actions"
            />

            <property
                name="showClusters"
                type="Boolean"
                label="Show Clusters"
                description="Check this option if you want to show clusters"
            />

            <property
                name="wildCard"
                type="String"
                label="xxx(deprecated)"
                description="Deprecated. Ignore this property"
            />
            <property
                name="wildCardSearch"
                type="String"
                label="zzz(deprecated)"
                description="Deprecated. Ignore this property"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endtab %}
{% endtabs %}


# GM - Map Record

(gmpkg:MapComponent)

## **Documentation**

**GM - Google Map** component is used to display Google map view of location. The component can be configured to map the current object or any related object. The location could be on a standard or a custom object.

**Use case:** Display a property on Google Maps for a real estate company.

## **Specification**

<table data-full-width="true"><thead><tr><th width="208.33333333333331">Property</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td>Record Id Field *</td><td>String</td><td><p>The name of the lookup field to maps. </p><p></p><p>Set this property to recordId to use the current recordId.</p></td></tr><tr><td>Place Fields *</td><td>String</td><td>',' Separated list of fields to build the address. Ex <strong>BillingStreet,BillingCity,BillingState.</strong> This property is useful for place view only.</td></tr><tr><td>Latitude Field *</td><td>String</td><td>Latitude Field. Ex <strong>BillingLatitude</strong>. This property is useful for street view only.</td></tr><tr><td>Longitude Field *</td><td>String</td><td>Longitude Field. Ex <strong>BillingLongitude</strong>. This property is useful for street view only.</td></tr><tr><td>Maps View</td><td>String</td><td>Maps default view <strong>place</strong> | <strong>streetview.</strong> The user can still switch to a different view if <strong>Enable Switch View</strong> is checked.</td></tr><tr><td>Enable Switch View</td><td>Boolean</td><td>Check this option to allow the user to switch between <strong>place</strong> and <strong>street</strong> view.</td></tr><tr><td>Maps Height</td><td>Integer</td><td>The height of the map.</td></tr><tr><td>Custom Label</td><td>String</td><td>The title of the map.</td></tr><tr><td>Custom Icon</td><td>String</td><td><p>The card icon. All lightning icons are supported. </p><p></p><p>The list of icons is available under <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons/</a>.</p></td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option to add a border to the card.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="MapComponent.design" %}

```xml
<design:component label="GM - Map Record">
    <design:attribute name="recordIdField" label="Record Id Field" 
            description="Record Id Field"/> 
    <design:attribute name="placeField" label="Place Fields" 
            description="',' Separated list of fields to build the address. Ex BillingStreet,BillingCity,BillingState"/> 
    <design:attribute name="latitudeField" label="Latitude Field" 
            description="Latitude Field. Ex BillingLatitude"/> 
    <design:attribute name="longitudeField" label="Longitude Field" 
            description="Longitude Field. Ex BillingLongitude"/> 
    <design:attribute name="view" label="Maps View" 
            description="Default view. Available options are place|streetview"/> 
    <design:attribute name="enableSwitchView" label="Enable Switch View?" 
            description="Enable switch view from Place to StreetView"/>             
    <design:attribute name="height" label="Maps Height" 
            description="Maps Height. The width is automatically calculated"/> 
    <design:attribute name="customLabel" label="Custom Label" 
            description="The label of card"/> 
    <design:attribute name="customIcon" label="Custom Icon" 
            description="Customize the map icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="showBorder" label="Show Border" 
            description="Show Border"/>
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Report Table

(gmpkg:reportTableLWC)

## **Documentation**

**GM - Report Table** component is used to display a Report table on any Lightning page (**Home**, **App**, **Record**). It supports **Tabular**, **Summarized** and **Matrix** Reports. The report filters can be configured through the App Builder and using the current object on a Record Page.

**Use case:** Display a summarized report of opportunities filtered by current account.

## **Specification**

<table data-full-width="true"><thead><tr><th width="246">Property</th><th width="119.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Report Developer Name *</td><td>String</td><td>The report developer name. This is a unique name across the org.</td></tr><tr><td>Details Row</td><td>Boolean</td><td><p>Check this option to show details row. </p><p></p><p>This option is useful for Summarized report only.</p></td></tr><tr><td>Subtotals</td><td>Boolean</td><td><p>Check this option to show Subtotals row. </p><p></p><p>This option is useful for Summarized report only.</p></td></tr><tr><td>Grand Total</td><td>Boolean</td><td><p>Check this option to show Grand Total header. </p><p></p><p>This option is useful for Summarized report only.</p></td></tr><tr><td>Filter</td><td>String</td><td><p>JSON Report Filters. </p><pre class="language-json"><code class="lang-json">{
    "$report_field": {
        "value": "$field_value"
    }
}
</code></pre><p>Where <strong>$report_field</strong> is the name of field to filter on an <strong>$field_value</strong> is the value of the filter. </p><p></p><p><strong>$recordId</strong> can be used to reference the current recordId. </p><p></p><p>Below is an example to filter an opportunity report based on the current account. </p><pre class="language-json"><code class="lang-json">{
    "ACCOUNT_ID": {
        "value": "$recordId"
    }
}
</code></pre><p></p><p><strong>$record</strong>.<strong>fieldApiName</strong> can be used to filter by any record field when the component is configured on a Lightning Record Page.</p></td></tr><tr><td>Hide Refresh</td><td>Boolean</td><td>Check this checkbox to hide the refresh button</td></tr><tr><td>Hide Expand</td><td>Boolean</td><td>Check this checkbox to hide the Expand button.</td></tr><tr><td>Hide Footer</td><td>Boolean</td><td>Check this checkbox to hide the footer. The user will not be able to toggle <strong>Details</strong> <strong>Row</strong>, <strong>Sub Totals</strong> and <strong>Grand Total</strong></td></tr><tr><td>Custom Label</td><td>Boolean</td><td>Set a specific label instead of the report label. When a custom label is defined, the user will no be able to navigate to the report.</td></tr><tr><td>Table Height</td><td>Integer</td><td>Set this property if you want to control the height. The user has to scroll vertically to see more records.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="reportTableLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="reportTable">
    <apiVersion>55.0</apiVersion>
    <masterLabel>GM - Report Table</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property
                name="developerName"
                type="String"
                label="Report Developer Name"
                description="Report Developer Name"
            />
            <property name="customLabel" type="String" label="Custom Label" description="Custom Report Label" />
            <property name="filter" type="String" label="Filter" description="JSON Report Filters" />
            <property name="detailsRow" type="Boolean" label="Details Row" description="Enable Details Row" />
            <property name="subtotals" type="Boolean" label="Subtotals" description="Enable Subtotals" />
            <property name="grandTotal" type="Boolean" label="Grand Total" description="Enable Grand Total" />
            <property name="showBorder" type="Boolean" label="Show Border" description="Show Border" />
            <property name="hideRefresh" type="Boolean" label="Hide Refresh" description="Hide the Refresh Button" />
            <property name="hideExpand" type="Boolean" label="Hide Expand" description="Hide the Expand Button" />
            <property name="hideFooter" type="Boolean" label="Hide Footer" description="Hide the Footer" />
            <property name="height" type="Integer" label="Table Height" description="Set the table height" />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}


# GM - Object Timeline

(gmpkg:timeLineContainerLWC)

## **Documentation**

**GM - Object Timeline** component is used to display a Timeline on any Lightning page (**Home**, **App**, **Record**). The object timeline filters can be configured through the App Builder and using the current object on a Record Page.

**Use case:** Display a timeline of Tasks filtered by current opportunity. See [Timeline tutorial](/product-tour/object-timeline).

## **Specification**

<table data-full-width="true"><thead><tr><th width="222.33333333333331">Property</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td>Show Header</td><td>Boolean</td><td>Check this option if you wish to display the header.</td></tr><tr><td>Title</td><td>String</td><td>Title of the card.</td></tr><tr><td>Icon</td><td>String</td><td><p>Icon name from the <a href="https://www.lightningdesignsystem.com/icons/">Salesforce Lightning Design System</a> to display in the header.</p><p>Ex: <strong>standard:account</strong></p></td></tr><tr><td>Timeline Configuration</td><td>String</td><td>JSON configuration describing the timeline content.</td></tr><tr><td>Card Variant</td><td>String</td><td>Path variant to use; linear or non-linear.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="timeLineContainerLWC.js-meta.xml" %}

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>52.0</apiVersion>
    <isExposed>true</isExposed>
    <masterLabel>GM - Object Timeline</masterLabel>
    <description>GM - Object Timeline</description>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
    </targets>
    <targetConfigs>
        <targetConfig
            targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage"
        >
            <property
                name="showHeader"
                type="Boolean"
                label="Show Header"
                description="Check to display the header"
            />
            <property
                name="headerTitle"
                type="String"
                label="Title"
                description="Title to display on the header"
            />
            <property
                name="headerIcon"
                type="String"
                label="Icon"
                description="Header icon to display on the header (SLDS Icons)"
            />
            <property
                name="jsonConfig"
                type="String"
                label="Timeline Configuration"
                description="JSON Timeline Configuration"
            />
            <property
                name="variant"
                type="String"
                label="Variant"
                description="Card Variant"
            />
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>

```

{% endtab %}
{% endtabs %}


# GM - Flow View Grid

(gmpkg:FlowViewGridComponent)

## **Documentation**

**GM - Flow View Grid** component is used to view and select records from a data grid inside a flow.

**Use case:** Display a grid of contacts to add them as opportunity contact roles in a screen flow. See [Flow Tutorial](/product-tour/smart-grids-in-flows).

## **Specification**

The following properties use JSON syntax as part of their configuration: **Filter, Custom Field Labels, Cell Coloring.**

<table data-full-width="true"><thead><tr><th width="244">Property</th><th width="131.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Related Object Name *</td><td>String</td><td>The name of the related object to display</td></tr><tr><td>FieldSet Name *</td><td>String</td><td>The Field Set name of the related object to display</td></tr><tr><td>Row Limit *</td><td>Integer</td><td>The maximum number of rows to fetch.</td></tr><tr><td>Custom Label</td><td>String</td><td>Override the title of the data grid.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the data grid icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Grid Height</td><td>Integer</td><td>Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.</td></tr><tr><td>Column Style</td><td>String</td><td>JSON string to override the column's style. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Candidates</td><td>String</td><td>The list of records to display. The collection should be a JSON string. See <a href="/product-tour/smart-grids-in-flows">Flow Tutorial</a>. Within GM - Flow View Grid you can use either Candidates or Filter. We use only the list of Id(s) to get the records.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Sort</td><td>String</td><td>The field list to sort the data grid. This field is used only for the initial load.  Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value asc. For descending enter the value desc</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid.</td></tr><tr><td>Show Column Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid columns.</td></tr><tr><td>Custom Field Labels</td><td>String</td><td>A JSON string to override column label. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Cell Coloring</td><td>String</td><td>JSON conditions for cells coloring. You can define for each field displayed in the grid the coloring and the corresponding condition. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Lookup Fields Options</td><td>String</td><td>JSON string to customize lookup fields. You can define different aspects for each lookup field. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Show Record Details</td><td>Boolean</td><td>Check this option to allow the end-user to view the record details in the grid</td></tr><tr><td>Required</td><td>Boolean</td><td>Check this option to make a record selection required before moving to the next step.</td></tr><tr><td>Single Record Selection</td><td>Boolean</td><td>Check this option to make a single record selection.</td></tr><tr><td>Selected Records</td><td>String</td><td>The list of selected records as JSON string. Set this property only if you want to assign the output manually. </td></tr><tr><td>Selected Id(s)</td><td>String</td><td>The list of selected recordId. Set this property only if you want to assign the output manually.</td></tr><tr><td>Selected Record</td><td>String</td><td>The selected record as JSON string. Set this property only if you want to assign the output manually. This property is valid only if <strong>Single Record Selection</strong> is checked.</td></tr><tr><td>Selected Id</td><td>String</td><td>Selected record id. Set this property only if you want to assign the output manually. This property is valid only if <strong>Single Record Selection</strong> is checked.</td></tr><tr><td>Group By</td><td>String</td><td><p>',' separated list of fields to group by. Don’t forget __c for custom fields.</p><p>When an aggregation is defined, the Grid will display the intermediate aggregations at the group level.</p><p>The configuration wizard can be used to set this property.</p></td></tr><tr><td>Enable Explorer</td><td>Boolean</td><td>Check this option if you want to use the Grid Explorer. When this option is active, the end user will be able to explore the grid through the Explorer by filtering the records, hiding or reordering the columns and also by setting the grouping.</td></tr><tr><td>Search Fields</td><td>String</td><td>',' separated list of fields to search in. If the list is empty, the search input is hidden in action. Only text fields (Text, PickList, Phone, Email, URL) are supported. The configuration wizard can be used to set this property.</td></tr><tr><td>Wildcard Search</td><td>Boolean</td><td>Check this option if you wish to use a wildcard search. If this option is activated, the end user doesn’t have to add ‘*’ to the search query.</td></tr><tr><td>No Card Header</td><td>Boolean</td><td>Check this option to hide the grid header. Only the table will be displayed.</td></tr><tr><td>View Only Mode</td><td>Boolean</td><td>Check this option to display the grid in a view mode only. No checkbox is available. This mode is usefull to display a summary table for instance.</td></tr><tr><td>Aggregate</td><td>String</td><td>JSON string to define the aggregate field. Use __c for custom fields. The supported functions are "sum", "min", "max", "avg" and "avgnotnull". See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Collapse Groups</td><td>Boolean</td><td><p>Check this options to collapse groups by default.</p><p>This option is relevant only it the records are grouped.</p><p>The user can still expand a group. When a group is expanded, the user can select/unselect the whole group records using the checkbox at the group level.</p></td></tr><tr><td>Preserve Selection</td><td>Boolean</td><td><p>Check this option to preserve the user selection. This option is useful when the search fields are configured or the explorer is enabled. </p><p></p><p>When the candidates are refreshed, the selected records that are no longer valid will be appended to the top of the grid.</p><p> </p></td></tr><tr><td>Record Related Components</td><td>String</td><td>JSON string to initialize related components.</td></tr><tr><td>No Load at Startup</td><td>Boolean</td><td>Check this option if you want to disable to load the grid at startup. The user has to trigger a search to get the results.</td></tr><tr><td>Formula Columns</td><td>String</td><td>JSON string to define formula columns.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FlowViewGridComponent.design" %}

```xml
<design:component label="GM - Flow View Grid">
    <design:attribute name="recordId" label="01. recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedObjectName" label="02. Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="fieldSetName" label="03. FieldSet Name" 
                      description="The fieldSet name of the related object to display"/>                            
    <design:attribute name="rowLimit" label="04. Row Limit" 
                      description="The maximum number of row to fetch"/>     
    <design:attribute name="customLabel" label="05. Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="06. Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="07. Grid Height" 
                      description="Set the grid height"/>  
    <design:attribute name="columnStyles" label="08. Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>     
    <design:attribute name="candidates" label="09. Candidates" 
                      description="The list of candidates to display"/>    
    <design:attribute name="filter" label="10. Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="11. Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="12. Order" 
                      description="Asc or Desc order for sorting"/>         
    <design:attribute name="showBorder" label="13. Show Border" 
                      description="Show Border"/>
    <design:attribute name="showColumnBorder" label="14. Show Column Border" 
                      description="Show Column Border"/>        
    <design:attribute name="fieldLabels" label="15. Custom Field Labels" 
                      description="{name:label} custom field labels map"/>    
    <design:attribute name="coloring" label="16. Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="lookupOptions" label="17. Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>            
    <design:attribute name="recordDetail" label="18. Show Record Details" 
                      description="Show Record Details"/>            
    <design:attribute name="required" label="19. Required" 
                      description="Set the selection as required"/>                
    <design:attribute name="singleRecord" label="20. Single Record Selection" 
                      description="Single record selection only"/>                               
    <design:attribute name="selectedJsonRecords" label="21. Selected Records" 
                      description="The list of selected records as JSON string"/>                                 
    <design:attribute name="selectedIds" label="22. Selected Id(s)" 
                      description="The list of selected id(s)"/>           
    <design:attribute name="selectedJsonRecord" label="23. Selected Record" 
                      description="The selected record as JSON string"/>                                 
    <design:attribute name="selectedId" label="24. Selected Id" 
                      description="Selected record id"/>                                 
    <design:attribute name="groupBy" label="25. Group By" 
                      description="',' separated list of fields to group by"/>                       
    <design:attribute name="canExplore" label="26. Enable Explorer" 
                      description="Check this option if you want to use the Grid Explorer"/>                           
    <design:attribute name="jsonSearchFields" label="27. Search Fields" 
                      description="',' separated search fields"/>   
    <design:attribute name="wildCardSearch" label="28. Wildcard Search" 
                      description="Use Wildcard Search"/>
    <design:attribute name="tableOnly" label="29. No Card Header" 
                      description="Hide Card Header"/>   
    <design:attribute name="viewOnly" label="30. View Only Mode" 
                      description="View only mode without record selection"/>                        
    <design:attribute name="aggregate" label="31. Aggregate" 
                      description="Json string to defined the aggregate fields. The components are supporting 'sum', 'minx' and 'max'. Don’t forget __c for custom fields. Ex. {'Amount':'sum'} to aggregate the amount of opportunities"/>        
    <design:attribute name="collapseGroups" label="32. Collapse Groups" 
                      description="Collapse groups"/>
    <design:attribute name="preserveSelection" label="33. Preserve Selection" 
                      description="Preserve Selection"/>   
    <design:attribute name="recordRelated" label="34. Record Related Components" 
                      description="Json string to initialize related components"/>       
    <design:attribute name="noLoadAtStartup" label="35. No Load at Startup" 
                      description="Check this option if you want to disable to load at startup"/>                                                                     
    <design:attribute name="jsonFormulas" label="36. Formula Columns" 
                      description="Json string to define formula columns."/>     
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Flow Edit Grid

(gmpkg:FlowEditGridComponent)

## **Documentation**

**GM - Flow Edit Grid** component is used to edit records from a data grid inside a flow.

**Use case:** Display a grid of contacts to add them as opportunity contact roles in a screen flow. See [Flow Tutorial](/product-tour/smart-grids-in-flows).

## **Specification**

The following properties use JSON syntax as part of their configuration: **.**

<table data-full-width="true"><thead><tr><th width="238">Property</th><th width="116.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>recordId to use. Keep this empty if you want to use the current record.</td></tr><tr><td>Related Object Name *</td><td>String</td><td>The name of the related object to display</td></tr><tr><td>FieldSet Name *</td><td>String</td><td>The Field Set name of the related object to display</td></tr><tr><td>Row Limit *</td><td>Integer</td><td>The maximum number of rows to fetch.</td></tr><tr><td>Page Size *</td><td>Integer</td><td>The number of rows to fetch per step. </td></tr><tr><td>Custom Label</td><td>String</td><td>Override the title of the data grid.</td></tr><tr><td>Custom Icon</td><td>String</td><td>Customize the data grid icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons<strong>/</strong></a></td></tr><tr><td>Grid Height</td><td>Integer</td><td>Set the grid height. Set this property if you want to control the height and show up components after the grid. The user has to scroll vertically to see more records.</td></tr><tr><td>Column Style</td><td>String</td><td>JSON string to override the column's style. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Candidates</td><td>String</td><td><p>The list of records to display. The collection should be a JSON string. See <a href="/product-tour/smart-grids-in-flows">Flow Tutorial</a>. </p><p>Within GM - Flow View Grid you can use either Candidates or Filter.  </p><p></p><p>Candidates could be a list of already stored records or a brand new ones. For stored objects, we use the list of Id(s) to get the records from the database </p></td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Sort</td><td>String</td><td>The field list to sort the data grid. This field is used only for the initial load.  Don’t forget __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting. For ascending enter the value asc. For descending enter the value desc</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid.</td></tr><tr><td>Show Column Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the grid columns.</td></tr><tr><td>Custom Field Labels</td><td>String</td><td>A JSON string to override column label. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Cell Coloring</td><td>String</td><td>JSON conditions for cells coloring. You can define for each field displayed in the grid the coloring and the corresponding condition. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Lookup Fields Options</td><td>String</td><td>JSON string to customize lookup fields. You can define different aspects for each lookup field. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Default Values</td><td>String</td><td>JSON string to initialize a new object created from the data grid. Use __c for custom fields. See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Enable Update Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to perform inline editing of the record displayed.</td></tr><tr><td>Enable Delete Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to delete records.</td></tr><tr><td>Enable Create Object</td><td>Boolean</td><td>Check this option if you wish to allow the end-user to create new records.</td></tr><tr><td>Save Records</td><td>Boolean</td><td>Check this option if you want to save the record when the user hits Next/Finish.</td></tr><tr><td>Updated Records</td><td>String</td><td>The list of updated records as JSON string. Set this property only if you want to assign the output manually. </td></tr><tr><td>Deleted Records</td><td>String</td><td>The list of deleted records. Set this property only if you want to assign the output manually.</td></tr><tr><td>Created Records</td><td>String</td><td>The list of new records as JSON string. It contains only created records.</td></tr><tr><td>Modified Records</td><td>String</td><td>The list of modified records as JSON string. It contains only modified records.</td></tr><tr><td>Cell Change Handler</td><td>String</td><td>Lightning component to handle cell change. See <a href="#cell-change-handler-example">Cell Handler</a> example.</td></tr><tr><td>Enable Auto Fill</td><td>Boolean</td><td>Check this option if you want to enable auto fill. With this option enabled, the user can drag to fill values like Excel.</td></tr><tr><td>ReadOnly Fields</td><td>String</td><td>',' separated list of read-only fields. The user will not be able to edit these fields the same as read-only fields on the page layout.  See <a href="/package-reference/components-library/gm-relatedlist-grid#specification">GM - RelatedList Grid</a></td></tr><tr><td>Action Labels</td><td>String</td><td><p>JSON string override the action labels. Any flow action can be customized. See the example below :</p><pre class="language-json"><code class="lang-json">{
    "BACK": "Go Back",
    "PAUSE": "Suspend",
    "FINISH": "Done",
    "NEXT": "Go Next"
}
</code></pre></td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FlowEditGridComponent.design" %}

```xml
<design:component label="GM - Flow Edit Grid">
    <design:attribute name="recordId" label="01. recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedObjectName" label="02. Related Object Name" 
                      description="The name of the related object to display. Ex. Opportunity"/>    
    <design:attribute name="fieldSetName" label="03. FieldSet Name" 
                      description="The fieldSet name of the related object to display"/>                            
    <design:attribute name="rowLimit" label="04. Row Limit" 
                      description="The maximum number of row to fetch"/>     
    <design:attribute name="customLabel" label="05. Custom Label" 
                      description="Override the label of data grid"/> 
    <design:attribute name="customIcon" label="06. Custom Icon" 
                      description="Customize the data grid icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="height" label="07. Grid Height" 
                      description="Set the grid height"/>  
    <design:attribute name="columnStyles" label="08. Column Style" 
                      description="Json string to define column's style. Don’t forget __c for custom fields. Ex. {'StageName':'width:200px'} to set the width for Stage column"/>     
    <design:attribute name="candidates" label="09. Candidates" 
                      description="The list of candidates to display"/>    
    <design:attribute name="filter" label="10. Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="11. Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="12. Order" 
                      description="Asc or Desc order for sorting"/>         
    <design:attribute name="showBorder" label="13. Show Border" 
                      description="Show Border"/>
    <design:attribute name="showColumnBorder" label="14. Show Column Border" 
                      description="Show Column Border"/>        
    <design:attribute name="fieldLabels" label="15. Custom Field Labels" 
                      description="{name:label} custom field labels map"/>    
     <design:attribute name="coloring" label="16. Cell Coloring" 
                      description="JSON conditions for cells coloring"/>
    <design:attribute name="lookupOptions" label="17. Lookup Fields Options" 
                      description="JSON options for lookup fields {apiName : {titleField : value, subTitleField : value}}"/>            
    <design:attribute name="defaultValues" label="18. Default Values" 
                      description="Json string to initialize a new object created from the data grid. Don’t forget __c for custom fields. Ex. {'accountid':'$recordId', 'name':'Opp 1', 'stagename':'Needs Analysis'}"/>
    <design:attribute name="canUpdate" label="19. Enable Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canDelete" label="20. Enable Delete Object" 
                      description="Check this option if you want to delete object"/>    
    <design:attribute name="canCreate" label="21. Enable Create Object" 
                      description="Check this option if you want to create object"/>
    <design:attribute name="saveOnNext" label="22. Save Records" 
                      description="Check this option if you want to save the record on next"/>                                                                                   
    <design:attribute name="updatedJsonRecords" label="23. Updated Records" 
                      description="The list of updated records as JSON string. It includes created and modified records"/>                                     
    <design:attribute name="deletedJsonRecords" label="24. Deleted Records" 
                      description="The list of deleted records as JSON string"/>                                                           
    <design:attribute name="createdJsonRecords" label="25. Created Records" 
                      description="The list of new records as JSON string. It contains only created records"/>
    <design:attribute name="modifiedJsonRecords" label="26. Modified Records" 
                      description="The list of modified records as JSON string. It contains only modified records"/>                                                                                                       
    <design:attribute name="cellHandlerDef" label="27. Cell Change Handler" 
                      description="Cell Change Handler Component"/>
    <design:attribute name="canDragToFill" label="28. Enable Auto Fill" 
                      description="Check this option if you want to enable auto fill"/>  
    <design:attribute name="readOnlyFields" label="29. ReadOnly Fields" 
                      description="',' separated list of readonly fields"/>      
    <design:attribute name="actionLabels" label="30. Action Labels" 
                      description="Custom action labels as JSON string. {'FINISH' : 'Done'}"/>
</design:component>
```

{% endtab %}
{% endtabs %}

## **Cell Handler Example**

{% tabs %}
{% tab title="CellHandlerComponent" %}

```html
<aura:component controller="CellHandlerController" access="global">
    <aura:method name="handleCellChange" action="{!c.handleCellChange}" access="global">
        <aura:attribute name="component" type="Object" />
        <aura:attribute name="params" type="Object" />
    </aura:method>
</aura:component>
```

{% endtab %}

{% tab title="CellHandlerComponentController" %}

```javascript
({
    handleCellChange: function (component, event, helper) {
        let args = event.getParam('arguments');

        let item = args.params.item;
        let column = args.params.column;
        let value = args.params.value;

        let parentComponent = args.component;

        if (column.name === 'Product2Id') {
            if (value) {
                let action = component.get('c.getListPrice');
                action.setParams({
                    oppId: item.OpportunityId,
                    prodId: value
                });

                action.setCallback(this, function (res) {
                    if (res.getState() === 'SUCCESS') {
                        let listPrice = res.getReturnValue();
                        parentComponent.setCellValue(
                            item.UID,
                            'ListPrice',
                            listPrice
                        );
                    } else if (res.getState() === 'ERROR') {
                        console.error(res.getError());
                    }
                });

                $A.enqueueAction(action);
            } else {
                parentComponent.setCellValue(item.UID, 'ListPrice', 0);
            }
        }
    }
});

```

{% endtab %}

{% tab title="CellHandlerController" %}

```apex
public with sharing class CellHandlerController {
    @AuraEnabled
    static public Decimal getListPrice(String oppId, String prodId) {
        Opportunity opp = [
            SELECT Id, Pricebook2Id
            FROM Opportunity
            WHERE Id = :oppId
        ];

        PricebookEntry pbe = [
            SELECT Id, UnitPrice
            FROM PricebookEntry
            WHERE Pricebook2Id = :opp.Pricebook2Id AND Product2Id = :prodId
        ];

        return pbe.UnitPrice;
    }
}
```

{% endtab %}
{% endtabs %}


# GM - RelatedList Tabs

(gmpkg:RelatedListTabSetComponent)

## **Documentation**

**GM - RelatedList Tabs** component is used to display a related list based as a Tab Set. This component is relevant for small related lists.

**Use case:** Display the list of payment methods as tabs on the account page.

## **Specification**

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Related List Label *</td><td>String</td><td>The label defined on the layout page. Set it to Contacts to display the list of contacts on the Account page.</td></tr><tr><td>Row Limit *</td><td>Integer</td><td>The maximum number of rows to fetch. The grid will never go beyond this number of records.</td></tr><tr><td>Filter</td><td>String</td><td>JSON string to define filter criteria. See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid </a></td></tr><tr><td>Sort</td><td>String</td><td>The field list to sort the related records. See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid </a></td></tr><tr><td>Order</td><td>String</td><td>Ascending or descending order for sorting. See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid </a></td></tr><tr><td>Label Field</td><td>String</td><td>Label Field for Tab title. If you want to display a list of contacts, set this to Name for instance. Each tab will have the name of the contact as a title.</td></tr><tr><td>Record Fields</td><td>String</td><td><p>Record Fields to display in a JSON format if you don’t want to display the whole layout. For instance, for a contact list, we can set it to:</p><pre class="language-json"><code class="lang-json">[
    "FirtName",
    "LastName",
    "MailingCity"
]
</code></pre><p></p><p>If this property is empty, the page layout will be used.</p></td></tr><tr><td># of Columns</td><td>String</td><td># of columns for the layout.</td></tr><tr><td>Record Related Components</td><td>String</td><td><p>A JSON string to add a list of inline components to display per record. Each inline component should have:</p><ul><li><strong>component</strong>: the name of GridMate component.</li><li><strong>attributes</strong>: the list of attributes to configure, same as on the lightning app builder.</li></ul><p>See <a href="/package-reference/components-library/gm-relatedlist-grid">GM - RelatedList Grid</a></p></td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the component.</td></tr><tr><td>Component Height</td><td>Integer</td><td>Set the component height. Set this property if you want to control the height. The user has to scroll vertically to see more records.</td></tr><tr><td>Actions</td><td>String</td><td><p>JSON string to initialize the list of available actions on each record.</p><p>Custom actions are available on each tab as toolbar. You can leverage your existing quick actions.</p><p></p><p>The configuration wizard can be used to build the list of actions. See <a href="https://docs.gridmate.io/package-reference/grid-configuration#actions-property">Actions Configuration</a></p></td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td><p>Check this option if you wish to display actions as buttons instead of icons.</p><p>When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.</p></td></tr><tr><td>Custom Visible Actions</td><td>Integer</td><td><p>Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course. </p><p>The remaining custom actions will be added as an option on the button menu.</p></td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RelatedListTabSetComponent.design" %}

```xml
<design:component label="GM - RelatedList Tabs">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedListLabel" label="Related List Label" 
                      description="The label defined in the layout page. Ex. Contacts to display contact list on account page"/>    
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>    
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
    
    <design:attribute name="labelField" label="Label Field" 
                      description="Label Field for Tab title"/>    
    <design:attribute name="recordFields" label="Record Fields" 
                      description="Record Fields to display"/> 
    <design:attribute name="layoutColumns" label="# of Columns" 
                      description="# of Columns for record layout"/> 
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related component"/>          
    
    <design:attribute name="canUpdate" label="Can Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canDelete" label="Can Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canCreate" label="Can Create Object" 
                      description="Check this option if you want to create object"/> 
    
    <design:attribute name="recordActions" label="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:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/> 
    <design:attribute name="height" label="Component Height" 
                      description="Set the component height"/>     
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - RelatedList Accordion

(gmpkg:RelatedListAccordionComponent)

## **Documentation**

**GM - RelatedList Accordion** component is used to display a related list based as an Accordion. This component is relevant for small related lists.

**Use case:** Display the list of payment methods as an accordion on the account page.

## **Specification**

**GM - RelatedList Accordion** component has the same properties as **GM - RelatedList Tabs.** Custom Actions will be displayed as dropdown menu.

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RelatedListAccordionComponent.design" %}

```xml
<design:component label="GM - RelatedList Accordion">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedListLabel" label="Related List Label" 
                      description="The label defined in the layout page. Ex. Contacts to display contact list on account page"/>    
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>    
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>
        
    <design:attribute name="labelField" label="Label Field" 
                      description="Label Field for section title "/>    
    <design:attribute name="recordFields" label="Record Fields" 
                      description="Record Fields to display"/>    
    <design:attribute name="layoutColumns" label="# of Columns" 
                      description="# of Columns for record layout"/>   
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    

    <design:attribute name="canUpdate" label="Can Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canDelete" label="Can Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canCreate" label="Can Create Object" 
                      description="Check this option if you want to create object"/> 
    
    <design:attribute name="recordActions" label="Actions" 
                      description="JSON Record Actions"/>            
    
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/> 
    <design:attribute name="height" label="Component Height" 
                      description="Set the component height"/>     
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - RelatedList Cards

(gmpkg:RelatedListCardComponent)

## **Documentation**

**GM - RelatedList Cards** component is used to display a related list as cards. This component is relevant for small related lists.

**Use case:** Display the list of payment methods as cards on the account page.

## **Specification**

**GM - RelatedList Cards** component has the same properties as **GM - RelatedList Tabs**.  Custom Actions will be displayed as dropdown menu.

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RelatedListCardComponent.design" %}

```xml
<design:component label="GM - RelatedList Cards">
    <design:attribute name="recordId" label="recordId" 
                      description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="relatedListLabel" label="Related List Label" 
                      description="The label defined in the layout page. Ex. Contacts to display contact list on account page"/>    
    <design:attribute name="rowLimit" label="Row Limit" 
                      description="The maximum number of row to fetch"/>    
    <design:attribute name="filter" label="Filter" 
                      description="Json string to define filter criteria. Don’t forget __c for custom fields. Ex. {'StageName':'Needs Analysis'} to see only 'Needs Analysis' Opportunities"/>    
    <design:attribute name="sort" label="Sort" 
                      description="The field list to sort the data grid. This field is used only for the initial load. Don’t forget __c for custom fields. Ex. Amount to sort opportunities by amount"/>
    <design:attribute name="order" label="Order" 
                      description="Asc or Desc order for sorting"/>       
    
    <design:attribute name="labelField" label="Label Field" 
                      description="Label Field for section title "/>    
    <design:attribute name="recordFields" label="Record Fields" 
                      description="Record Fields to display"/>    
     <design:attribute name="layoutColumns" label="# of Columns" 
                      description="# of Columns for record layout"/>
    <design:attribute name="recordRelated" label="Record Related Components" 
                      description="Json string to initialize related components"/>    
      
    <design:attribute name="canUpdate" label="Can Update Object" 
                      description="Check this option if you want to update object"/>    
    <design:attribute name="canDelete" label="Can Delete Object" 
                      description="Check this option if you want to delete object"/>        
    <design:attribute name="canCreate" label="Can Create Object" 
                      description="Check this option if you want to create object"/> 
    
    <design:attribute name="recordActions" label="Actions" 
                      description="JSON Record Actions"/>            
    
    <design:attribute name="customIcon" label="Custom Icon" 
                      description="Customize the card icon. All lightning icons are supported. You can get the icon name from https://lightningdesignsystem.com/icons/"/> 
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show Border"/> 
    <design:attribute name="height" label="Component Height" 
                      description="Set the component height"/>     
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Record Card

(gmpkg:RecordCardComponent)

## **Documentation**

**GM - Record Card** component is used to display a card of a related object. The related object could be at any level. The component can be configured to display a list of fields for a simple scenario or layout configuration for complex pages.

**Use case:** Display the ultimate account details on the contact page.

## **Specification**

<table data-full-width="true"><thead><tr><th width="198.33333333333331">Property</th><th width="151">Type</th><th>Description</th></tr></thead><tbody><tr><td>Card Title *</td><td>String</td><td>The card title to display</td></tr><tr><td>Card Icon</td><td>String</td><td>The card icon. All lightning icons are supported. You can get the icon name from <a href="https://lightningdesignsystem.com/icons/">https://lightningdesignsystem.com/icons/</a></td></tr><tr><td>Object Name *</td><td>String</td><td>The name of the related object to display.</td></tr><tr><td>Record Id Field *</td><td>String</td><td>The name of the lookup field to display. If you want to display an account card, set this property to AccountId.</td></tr><tr><td>Record Fields</td><td>String</td><td><p>Record Fields to display in a JSON format. For instance, for an account card, we can set it to:</p><p><code>["Name", "Website","BillingCity"]</code> </p><p></p><p>This property is ignored if Record Layout property is defined.</p></td></tr><tr><td>Record Actions</td><td>String</td><td><p>Record actions to apply. You can leverage your existing quick actions.</p><p></p><p>The configuration wizard can be used to build the list of actions. See <a href="https://docs.gridmate.io/package-reference/grid-configuration#actions-property">Actions Configuration</a></p></td></tr><tr><td># of columns</td><td>Integer</td><td># of columns for the layout. This property is ignored if Record Layout property is defined.</td></tr><tr><td>Display Mode</td><td>String</td><td>Display mode (edit, view, readonly).</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border to the card.</td></tr><tr><td>Record Layout</td><td>String</td><td>Record Layout to display. See <a href="/package-reference/components-library/gm-record-layout">GM - Record Layout</a></td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td><p>Check this option if you wish to display actions as buttons instead of icons.</p><p>When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.</p></td></tr><tr><td>Visible Actions</td><td>Integer</td><td><p>Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course. </p><p>The remaining custom actions will be added as an option on the button menu.</p></td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RecordCardComponent.design" %}

```xml
<design:component label="GM - Record Card">
    <design:attribute name="title" label="Card Title" 
                      description="Card Title"/>
    <design:attribute name="icon" label="Card Icon" 
                      description="Card Icon"/>
    <design:attribute name="showBorder" label="Show Border" 
                      description="Show record card border"/>       
    
    <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="recordFields" label="Record Fields" 
                      description="Record Fields to display"/>
    <design:attribute name="columns" label="# of columns" 
                      description="# of Columns for the layout"/>    
    <design:attribute name="mode" label="Display Mode" 
                      description="Display mode (edit, view, readonly)"/>            
    
    <design:attribute name="recordLayout" label="Record Layout" 
                      description="JSON Record Layout"/>
    
    <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>
```

{% endtab %}
{% endtabs %}


# GM - Record Layout

(gmpkg:RecordLayoutComponent)

## **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**

<table data-full-width="true"><thead><tr><th width="191.67917410949835">Property</th><th width="154.55150547835012">Type</th><th>Description</th></tr></thead><tbody><tr><td>Object Name *</td><td>String</td><td>The name of the related object to display.</td></tr><tr><td>Record Id Field *</td><td>String</td><td>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 <strong>recordId</strong>.</td></tr><tr><td>Record Layout *</td><td>String</td><td>The record layout is a way to describe the sections and the visibility of each section using a JSON format. See <a href="#record-layout-schema">Record Layout Schema</a></td></tr><tr><td>Record Actions</td><td>String</td><td><p>Record actions to apply. You can leverage your existing quick actions.</p><p></p><p>The configuration wizard can be used to build the list of actions. See <a href="https://docs.gridmate.io/package-reference/grid-configuration#actions-property">Actions Configuration</a> </p><p></p><p>An action has these properties:</p><ul><li><strong>name</strong>: the name of the action.</li><li><strong>label</strong>: the label of the action</li><li><strong>icon</strong>: the icon to display. Only utility:* icons are supported</li><li><strong>visibility</strong>: visibility condition for the action same as for a section. </li></ul></td></tr><tr><td>Show Actions as Buttons</td><td>Boolean</td><td><p>Check this option if you wish to display actions as buttons instead of icons.</p><p>When the actions are displayed as icons, we can define the icon on JSON actions configuration using the icon attribute.</p></td></tr><tr><td>Visible Actions</td><td>Integer</td><td><p>Set the number of visible custom actions. All the core actions will always be displayed depending on the configuration of course. </p><p>The remaining custom actions will be added as an option on the button menu.</p></td></tr></tbody></table>

### 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 [Javascript Formulas](/package-reference/javascript-formulas).
* **readOnly:** Read-only JSON condition. It should be built it the same way as[ ](https://docs.google.com/document/d/1vLiHubI7Y5T6oC7vCVPR2Sb9rV9hXrZXirMvVwp5Iks/edit#bookmark=id.eqgy1mh5zdow)Read-only Fields. If the section is read-only, all its fields will be read-only as well&#x20;
* **readOnlyFormula**: Read-Only Javascript condition. Using a formula is useful to compare fields instead of using static value. See [Javascript Formulas](/package-reference/javascript-formulas).
* **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
* **readOnly**: Read-only condition. It should be built it the same way as[ ](https://docs.google.com/document/d/1vLiHubI7Y5T6oC7vCVPR2Sb9rV9hXrZXirMvVwp5Iks/edit#bookmark=id.eqgy1mh5zdow)Read-only Fields
* **readOnlyFormula**: Read-Only Javascript condition. Using a formula is useful to compare fields instead of using static value. See [Javascript Formulas](/package-reference/javascript-formulas).
* **visibility**: visibility condition. It should be built it the same way as[ ](https://docs.google.com/document/d/1vLiHubI7Y5T6oC7vCVPR2Sb9rV9hXrZXirMvVwp5Iks/edit#bookmark=id.eqgy1mh5zdow)Read-only Fields
* **visibilityFormula**: Visibility Javascript condition. Using a formula is useful to compare fields instead of using static value. See [Javascript Formulas](/package-reference/javascript-formulas).
* **coloring**: Conditions for coloring. You can define the coloring and the corresponding condition same as Cell Coloring for Grids.&#x20;

  ```json
  [
      {
          "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.&#x20;

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"

{% hint style="info" %}
Parent fields can be used for Visibility and ReadOnly conditions. See the example below:

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

{% endhint %}

### Configuration Examples

{% content-ref url="/pages/-MEx-qAobXuuNrOYEJ00" %}
[Layout basic setup](/troubleshooting/config-samples/record-layout)
{% endcontent-ref %}

{% content-ref url="/pages/cgghKY6yRyM2oEF59CN5" %}
[Layout with section visibility](/troubleshooting/config-samples/layout-with-section-visibility)
{% endcontent-ref %}

{% content-ref url="/pages/4RUisMHH91qaM5Q9OZIE" %}
[Layout with field visibility](/troubleshooting/config-samples/layout-with-field-visibility)
{% endcontent-ref %}

{% content-ref url="/pages/ZSlP39kqmJHdNGRLM1kD" %}
[Layout with read only field](/troubleshooting/config-samples/layout-with-read-only-field)
{% endcontent-ref %}

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RecordLayoutComponent.design" %}

```xml
<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>
```

{% endtab %}
{% endtabs %}


# GM - Record Layout (LWC)

(gmpkg/RecordLayoutLWCComponent)

## **Documentation**

**GM - Record Layout (LWC)** component is used to display a related object using a layout configuration same as [GM - Record Layout](/package-reference/components-library/gm-record-layout#documentation). It bypasses the limitation of Salesforce UI API. This component can be used to manipulate any Salesforce object especially **Event** and **Task**.

**Use case:** Display the event details when expanding a record from open activities related list.

## **Specification**

**GM - Record Layout (LWC)** component has the same properties as [**GM - Record Layout**](/package-reference/components-library/gm-record-layout#specification)**.** However, it provides more capabilities in terms of styling. Section header can be hidden and each field can be styled by setting the variant, the border, the label styling and the value styling. The styling capabilities are useful on a community website for instance. Below is a configuration to showcase the styling:

```coffeescript
{
    "density": "comfy",
    "sections": [
        {
            "name": "contactInformation",
            "label": "Contact Information",
            "variant": "header-hidden",
            "active": "always",
            "cols": 1,
            "rows": [
                [
                    {
                        "apiName": "Name",
                        "variant": "label-hidden",
                        "style": {
                            "label": "font-size:large;color:red",
                            "value": "font-size:large;text-align:center;color:green",
                            "border": "none"
                        }
                    }
                ],
                [
                    {
                        "apiName": "gmpkg__Image_Test__c",
                        "variant": "label-hidden",
                        "style": {
                            "value": "text-align:center",
                            "border": "none"
                        }
                    }
                ]
            ]
        }
    ]
}
```

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="RecordLayoutLWCComponent.design" %}

```xml
<design:component label="GM - Record Layout (LWC)">    
    <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:component>
```

{% endtab %}
{% endtabs %}


# GM - Enhanced Record Layout

(gmpkg/recordLayoutLWC)

## **Documentation**

**GM - Enhanced Record Layout** component displays and edits a record using a JSON layout configuration, the same one used by [GM - Record Layout](/package-reference/components-library/gm-record-layout) and [GM - Record Layout (LWC)](/package-reference/components-library/gm-record-layout-lwc). It is a native Lightning Web Component: it can be placed on record, app, home and Experience Cloud pages, on desktop and on phone, without an Aura wrapper.

On top of the layout JSON, it supports layout actions, validation rules, an Apex validation action and a custom metadata configuration. See [Enhanced Record Layout](/advanced-guides/enhanced-record-layout) for the walkthrough.

## **Specification**

<table><thead><tr><th width="243.388916015625">Property</th><th>Description</th></tr></thead><tbody><tr><td><strong>Record Id</strong></td><td>Id of the record to display. Leave empty on a record page.</td></tr><tr><td><strong>Layout Config</strong></td><td>Developer Name of a <strong>Record Layout</strong> custom metadata record. When set, the values of the record replace the properties below, including the empty ones.</td></tr><tr><td><strong>Object Name</strong></td><td>API name of the object to display.</td></tr><tr><td><strong>Record Id Field</strong></td><td>Field of the page record holding the Id of the record to display. <code>Id</code> when the component is placed on the record itself.</td></tr><tr><td><strong>Record Layout</strong></td><td>JSON layout: sections, rows, visibility, read-only and coloring rules, <code>validate</code> rules and <code>rulesMode</code>.</td></tr><tr><td><strong>Layout Actions</strong></td><td>JSON array of layout actions displayed in the header.</td></tr><tr><td><strong>Record Actions</strong></td><td>JSON array of record actions displayed in the record toolbar.</td></tr><tr><td><strong>Show Actions as Buttons</strong></td><td>Display the record actions as buttons instead of icons.</td></tr><tr><td><strong>Custom Visible Actions</strong></td><td>Number of record actions displayed before the overflow menu.</td></tr><tr><td><strong>Show Border</strong></td><td>Display the card border.</td></tr></tbody></table>

### Layout Actions

<table><thead><tr><th width="249.7822265625">Key</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>Unique name of the action.</td></tr><tr><td><code>label</code></td><td>Button label.</td></tr><tr><td><code>icon</code></td><td>Button icon, e.g. <code>utility:check</code>.</td></tr><tr><td><code>mode</code></td><td><code>view</code> or <code>edit</code>. Omit to display the action in both modes.</td></tr><tr><td><code>type</code></td><td><code>layout</code> (default) applies the <code>command</code> to the layout. <code>apex</code> runs the Apex validator.</td></tr><tr><td><code>stateful</code></td><td><code>layout</code> actions are toggles by default. Set to <code>false</code> for a one-shot action.</td></tr><tr><td><code>command</code></td><td><code>layout</code> actions only. <code>{ "id", "target": { "fields" | "sections" | "formula" }, "changes": { "hidden", "readOnly", "highlighted", "backgroundColor", "style" } }</code></td></tr><tr><td><code>apexClass</code></td><td><code>apex</code> actions only. Name of the <code>Callable</code> class.</td></tr><tr><td><code>params</code></td><td><code>apex</code> actions only. JSON object passed to the class.</td></tr><tr><td><code>successMessage</code></td><td><code>apex</code> actions only. Toast displayed when the class returns no error.</td></tr></tbody></table>

```json
{
    "name": "validateAccount",
    "label": "Validate",
    "icon": "utility:check",
    "type": "apex",
    "mode": "edit",
    "apexClass": "AccountLayoutValidator",
    "params": { "strict": true },
    "successMessage": "Account looks good"
}
```

### Apex Validator

The class referenced by `apexClass` implements `Callable`. It is invoked with the action `validate` and the following arguments:

| Argument     | Type                  | Description                                                   |
| ------------ | --------------------- | ------------------------------------------------------------- |
| `record`     | `SObject`             | The record with the values currently displayed, saved or not. |
| `objectName` | `String`              | API name of the object.                                       |
| `params`     | `Map<String, Object>` | The `params` of the layout action.                            |

It returns a `List<gmpkg.SaveHookManager.SaveHookResult>`. A result with `fields` is displayed under each field, a result without `fields` is displayed as a record-level error, an empty list displays the `successMessage`.

```java
global with sharing class AccountLayoutValidator implements Callable {
    global Object call(String action, Map<String, Object> args) {
        Account acc = (Account) args.get('record');
        List<gmpkg.SaveHookManager.SaveHookResult> results = new List<gmpkg.SaveHookManager.SaveHookResult>();

        if (acc.AccountSource == 'Web' && String.isBlank(acc.Phone)) {
            // Field-level: statusCode, message, fields
            results.add(
                new gmpkg.SaveHookManager.SaveHookResult(
                    'FIELD_CUSTOM_VALIDATION_EXCEPTION',
                    'Web accounts must have a phone number.',
                    new List<String>{ 'Phone' }
                )
            );
        }

        if (acc.Industry == 'Banking' && String.isBlank(acc.Description)) {
            // Record-level: statusCode, message
            results.add(
                new gmpkg.SaveHookManager.SaveHookResult(
                    'CUSTOM_VALIDATION_EXCEPTION',
                    'Banking accounts require a description.'
                )
            );
        }

        return results;
    }
}
```

### Record Layout Metadata

Custom metadata type **Record Layout** (`gmpkg__Record_Layout__mdt`). Set **Layout Config** to the **Record Layout Name** of a record to load the configuration from it.

<table><thead><tr><th width="257.4383544921875">Field</th><th>Component Property</th></tr></thead><tbody><tr><td><strong>Sobject</strong></td><td><strong>Object Name</strong></td></tr><tr><td><strong>Record Id Field</strong></td><td><strong>Record Id Field</strong></td></tr><tr><td><strong>Record Layout</strong></td><td><strong>Record Layout</strong></td></tr><tr><td><strong>Layout Actions</strong></td><td><strong>Layout Actions</strong></td></tr><tr><td><strong>Record Actions</strong></td><td><strong>Record Actions</strong></td></tr><tr><td><strong>Button Actions</strong></td><td><strong>Show Actions as Buttons</strong></td></tr><tr><td><strong>Visible Actions</strong></td><td><strong>Custom Visible Actions</strong></td></tr><tr><td><strong>Show Border</strong></td><td><strong>Show Border</strong></td></tr></tbody></table>

When **Layout Config** is set, every field of the metadata record replaces its property, including the empty ones.

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="recordLayoutLWC.js-meta.xml" %}

```xml
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>65.0</apiVersion>
    <masterLabel>GM - Enhanced Record Layout</masterLabel>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightningCommunity__Page</target>
        <target>lightningCommunity__Default</target>
    </targets>
    <targetConfigs>
        <targetConfig targets="lightning__RecordPage,lightning__AppPage,lightning__HomePage">
            <property name="recordId" type="String" label="Record Id" />
            <property name="configName" type="String" label="Layout Config"
                      description="Developer Name of a Record Layout custom metadata record." />
            <property name="targetObjName" type="String" label="Object Name" />
            <property name="recordIdField" type="String" label="Record Id Field" />
            <property name="recordLayout" type="String" label="Record Layout"
                      description="JSON Record Layout, including required, validate, and rulesMode rules" />
            <property name="layoutActions" type="String" label="Layout Actions"
                      description="Optional JSON layout actions" />
            <property name="recordActions" type="String" label="Record Actions"
                      description="Optional JSON record actions shown in the record toolbar" />
            <property name="buttonActions" type="Boolean" label="Show Actions as Buttons"
                      description="Use buttons for actions instead of icons" />
            <property name="visibleActions" type="Integer" label="Custom Visible Actions"
                      description="# of visible custom actions" />
            <property name="showBorder" type="Boolean" label="Show Border" />
            <supportedFormFactors>
                <supportedFormFactor type="Large" />
                <supportedFormFactor type="Small" />
            </supportedFormFactors>
        </targetConfig>
    </targetConfigs>
</LightningComponentBundle>
```

{% endtab %}
{% endtabs %}


# GM - Field Path

(gmpkg:FieldPathComponent)

## **Documentation**

**GM - Field Path** component is used to display the progress of a process based on the specified picklist field. This component doesn't need path configuration to display the stages.

**Use case:** Display opportunity sub stage using a custom picklist field.

## **Specification**

<table data-full-width="true"><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>recordId</td><td>String</td><td>Record Id to use. Keep this empty if you want to use the current record.</td></tr><tr><td>PickList Field Name</td><td>String</td><td>PickList field API name to use for stages.</td></tr><tr><td>Path Variant</td><td>String</td><td>Path variant to use; linear or non-linear.</td></tr></tbody></table>

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FieldPathComponent.design" %}
{% code fullWidth="true" %}

```xml
<design:component label="GM - Field Path">
    <design:attribute name="recordId" label="recordId" 
        description="recordId to use. Keep this empty if you want to use the current record"/>        
    <design:attribute name="variant" label="Path Variant"
        description="Path variant to use"/>    
    <design:attribute name="field" label="PickList Field Name"
        description="PickList field name to use for stages"/>
    <design:attribute name="jsonStages" label="Path Stages" 
        description="Json Path Stages. [{'label' : value, 'filter' : value}]"/>           
    <design:attribute name="mode" label="Display Mode"
        description="Display mode view | edit"/>        
</design:component>
```

{% endcode %}
{% endtab %}
{% endtabs %}


# GM - Flow Layout

(gmpkg:FlowLayoutComponent)

## **Documentation**

**GM - Flow Layout** component is used to edit a related object using a layout configuration within a flow. The related object could be at any level. You can configure this component to display sections and define also their visibilities. With this component, you can leverage your existing data model and reduce flow maintenance. The edited record is automatically saved after moving forward in the flow.

**Use case:** Edit the ultimate account details of a contact flow with different sections and of course more than 2 columns!

## **Specification**

**GM - Flow Layout** component has the same properties as **GM - Record Layout**.

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="FlowLayoutComponent.design" %}

```xml
<design:component label="GM - Flow Layout">    
    <design:attribute name="recordId" label="recordId" description="recordId to use. Use it only for community"/>        
    <design:attribute name="sObjectName" label="SObject Name" description="Object Name to load"/>    
    <design:attribute name="targetObjName" label="Target 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:component>
```

{% endtab %}
{% endtabs %}


# GM - Dynamic Tabs

(gmpkg:DataGridTabSetComponent)

## **Documentation**

**GM - Dynamic Tabs** component is used to display a Tab Set in a Lightning App Page. It could be useful to build a workspace like an SRD Workspace.

## **Specification**

<table data-full-width="true"><thead><tr><th width="209">Property</th><th width="121.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>Tabs Config *</td><td>String</td><td>Tabs JSON configuration describing the tabs and the content for each tab.</td></tr><tr><td>Extra Tabs Config</td><td>String</td><td>Extra Tabs JSON configuration describing the tabs and the content for each tab.</td></tr><tr><td>Variant</td><td>String</td><td>The The appearance of the Tabs : default, scoped or vertical</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border.</td></tr></tbody></table>

Example of Dynamic Tabs  configuration

```coffeescript
[
   {
      "label": "Contacts",
      "components": [
         {
            "component": "gmpkg:ListViewDataGridComponent",
            "attributes": {
               "relatedObjectName": "Contact",
               "listViewName": "AllContacts",
               "canCreate": false,
               "canUpdate": true,
               "canDelete": true,
               "canFilter": true,
               "recordDetail": true,
               "inline": true,
               "showBorder": true,
               "showColumnBorder": true               
            }
         }
      ]
   },
   {
      "label": "Accounts",
      "components": [
         {
            "component": "gmpkg:ListViewDataGridComponent",
            "attributes": {
               "relatedObjectName": "Account",
               "listViewName": "AllAccounts",
               "canCreate": false,
               "canUpdate": true,
               "canDelete": true,
               "canFilter": true,
               "showBorder": true,
               "inline": true
            }
         }
      ]
   }
]
```

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="DataGridTabSetComponent.design" %}

```xml
<design:component label="GM - Dynamic Tabs">
    <design:attribute name="tabItems" label="Tabs Config." description="Tabs JSON configuration"/>
    <design:attribute name="extraTabItems" label="Extra Tabs Config." description="Extra Tabs JSON configuration"/>
    <design:attribute name="variant" label="Variant" description="The appearance of the tabset (default|scoped|vertical)"/>
    <design:attribute name="showBorder" label="Show border?" />    
</design:component>
```

{% endtab %}
{% endtabs %}


# GM - Dynamic Accordion

(gmpkg:DataGridAccordionComponent)

## **Documentation**

**GM - Dynamic Accordion** component is used to display an accordion in a Lightning App Page. It could be useful to build a workspace like an SRD Workspace.

## **Specification**

<table data-full-width="true"><thead><tr><th width="210.33333333333331">Property</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td>Accordion Config *</td><td>String</td><td>Tabs JSON configuration describing the accordion and the content for each section.</td></tr><tr><td>Show Border</td><td>Boolean</td><td>Check this option if you wish to add a border.</td></tr></tbody></table>

Example of Dynamic Accordion  configuration

```coffeescript
[
   {
      "label": "Contacts",
      "components": [
         {
            "component": "gmpkg:ListViewDataGridComponent",
            "attributes": {
               "relatedObjectName": "Contact",
               "listViewName": "AllContacts",
               "canCreate": false,
               "canUpdate": true,
               "canDelete": true,
               "canFilter": true,
               "recordDetail": true,
               "inline": true,
               "showBorder": true,
               "showColumnBorder": true
            }
         }
      ]
   },
   {
      "label": "Accounts",
      "components": [
         {
            "component": "gmpkg:ListViewDataGridComponent",
            "attributes": {
               "relatedObjectName": "Account",
               "listViewName": "AllAccounts",
               "canCreate": false,
               "canUpdate": true,
               "canDelete": true,
               "canFilter": true,
               "showBorder": true,
               "inline": true
            }
         }
      ]
   }
]
```

## **API Reference**

{% tabs fullWidth="true" %}
{% tab title="DataGridAccordionComponent.design" %}

```xml
<design:component label="GM - Dynamic Accordion">
    <design:attribute name="jsonSections" label="Accordion Config." description="Accordion JSON configuration"/>
    <design:attribute name="showBorder" label="Show border?" />    
</design:component>
```

{% endtab %}
{% endtabs %}




---

[Next Page](/llms-full.txt/1)

