Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

GM - Mobile Grid

(gmpkg:mobileGridLWC)

Documentation

GM - Mobile Grid component is a touch-first grid for the Salesforce mobile app. Records are displayed as cards with a linked title, detail fields, an icon and an info button showing more fields. The toolbar offers refresh, search, quick filters, quick sort and a menu of mass actions. Cards can be grouped on several levels with totals, colored with conditions and selected for mass actions.

Use case: Display the opportunities of an account, grouped by stage with the total amount, on the account record page of the Salesforce mobile app. See Mobile Grid.

The JSON properties are validated when the component loads. An invalid value shows an error toast with the property name, and the component ignores that property.

Specification

Property
Type
Description

Custom Label

String

Set the label of the mobile grid.

Custom Icon

String

Customize the mobile grid icon. The icon is displayed on each card. All Lightning icons are supported, for example standard:opportunity.

DataGrid Code

String

The code to identify the mobile grid. Reserved for future use.

Object Name

String

The name of the object to display on App and Home pages. Ex. Opportunity

Target Object Name

String

The name of the object to display if the mobile grid is shown on a record page. Ex. Opportunity

Title Field

String

The field used for the card title. The title links to the record.

Detail Fields

String

, separated list of fields displayed on the card. Ex. StageName,Amount,CloseDate

Popover Fields

String

, separated list of additional fields displayed when the user taps the info button of a card.

Row Limit

Integer

The maximum number of rows to fetch.

Filter

String

JSON string to define filter criteria. On a record page, $recordId is replaced by the current record Id. Ex. {"AccountId":"$recordId"}

Sort

String

The field list to sort the data. Ex. CloseDate

Order

String

Asc or Desc order for sorting.

Group By

String

, separated list of fields to group by. Each field adds a grouping level. Ex. StageName,Type

Collapse Groups

Boolean

Check this option to collapse all groups by default. The default value is unchecked.

Aggregate

String

JSON string to define aggregate fields, shown for the grid and for each group. The component supports sum, min, max and avg. Ex. {"Amount":"sum"}

Search Fields

String

, separated search fields. The search box is displayed when this property is set. The search applies to the loaded cards.

Card Coloring

String

JSON conditions for card coloring. The label of each condition is displayed in the coloring legend. See Card Coloring.

Enable Update Object

Boolean

Check this option if you want to edit records from the card menu.

Enable Mass Update

Boolean

Check this option if you want to mass update the selected cards. Requires Enable Update Object.

Enable Delete Object

Boolean

Check this option if you want to delete records from the card menu.

Enable Mass Delete

Boolean

Check this option if you want to mass delete the selected cards. Requires Enable Delete Object.

Actions

String

JSON string to initialize the list of actions available from the toolbar menu, on the selected cards. See Actions.

Record Actions

String

JSON string to initialize the list of actions available from the menu of each card. See Actions.

Height

Integer

Fixed height in pixels with an inner scroll. Leave it empty to let the component grow with its content.

Show Border

Boolean

Check this option to show a border around the cards.

Density

String

Component density: comfy | compact. The default value is comfy.

The update, delete, mass update and mass delete options are applied on top of the user access: they are displayed only when the user can update or delete the object. Mass Update edits the fields displayed on the card (title, detail and popover fields).

API Reference

Card Coloring

Card Coloring is a JSON list of conditions. The first condition that matches a record sets the background of its card. The label of each condition is listed in the coloring legend.

Actions

Actions run on the selected cards from the toolbar menu. Record Actions run on one card from its menu. Both properties use the same JSON format, and each action supports three types:

  • Quick action: set name to the quick action API name.

  • Flow: set component to gmpkg/dataGridCallFlowLWC and the flow name in attributes.

  • Navigation: set navigate to a page reference. The object name and the record Id(s) are added to its attributes.

For the flow input variables and the other action options, see Grid - Mass/Record Actions.

Last updated

Was this helpful?