Grid - Command Bridge
Drive an open grid from a Flow, Apex, an integration or an AI agent.
GridMate - Command Bridge lets you drive a grid from outside the page. A Flow, Apex code, an integration or an AI agent sends a command, and the grid open in the user's browser runs it right away: search, filter, sort, group, reload, or open its Mass Update or Export dialog.
Every grid type listens on its own: GM - FieldSet Grid, GM - ListView Grid, GM - RelatedList Grid and GM - User Grid. There is no component to add and no option to enable.
How it works
A publisher creates a Grid Interaction Event (
gmpkg__GridInteractionEvent__e) record. The event names one user and one grid.Every grid on that user's open pages receives the event.
A grid runs the command only when the User Id is the current user, and Object Name, Grid Name and Grid Code match the grid exactly.
Commands only go one way: nothing is sent back to the publisher. Nothing is saved without the user either. Mass Update and Export only open their dialogs, and the user confirms there.
Event fields
User Id
gmpkg__UserId__c
Yes
The 18-character Id of the user whose open grid should act.
Grid Name
gmpkg__GridName__c
Yes
User Grid: the grid's Developer Name. FieldSet, ListView or RelatedList grid: the field set, list view or related list name.
Grid Code
gmpkg__GridCode__c
No
User Grid: its Developer Name again. Other grids: the DataGrid Code property. Leave it blank to target a grid with no DataGrid Code.
Object Name
gmpkg__ObjectName__c
Yes, in practice
The API name of the grid's object, for example Opportunity. It must match exactly.
Correlation Id
gmpkg__CorrelationId__c
No
A UUID to trace a command in your logs.
Payload Json
gmpkg__PayloadJson__c
No
{"v":1,"args":{...}}. The args depend on the command. Blank means no arguments.
Targeting a grid
GM - User Grid
Developer Name
Developer Name
GM - FieldSet Grid with DataGrid Code PIPELINE_CMD
Field set name, for example Opportunity_SDR_FieldSet
PIPELINE_CMD
GM - FieldSet Grid without a DataGrid Code
Field set name
blank
GM - ListView Grid
List view name, for example AllOpportunities
DataGrid Code, or blank
GM - RelatedList Grid
Related list name
DataGrid Code, or blank
Commands
Command Type
args
What the grid does
applySearch
{"searchTerm":"Steel"}
Runs the search on the grid's Search fields.
applyFilter
{"filterJson":{"and":[{"StageName":{"operator":"=","value":"Negotiation/Review"}}]}}
Applies an advanced filter, using the same JSON as the Filter property.
applySort
{"sort":"Amount desc nulls last"}
Sorts the grid. Separate several fields with commas. Temporary: the saved view is not changed.
applyGrouping
{"groupBy":"StageName"}
Groups the grid. Separate several fields with commas. Temporary, like sort.
massUpdate
{}
Selects every loaded row and opens the Mass Update dialog. The user picks the field and value, and confirms.
exportItems
{}
Opens the Export dialog for the filtered records. The user can choose Export only selected records.
reload
{}
Reloads the grid's records.
The grid ignores command types it doesn't know, and payloads that aren't valid JSON.
Permissions
The GridMate permission set grants Read on Grid Interaction Event. That's all a grid needs to listen.
Create on Grid Interaction Event lets a user or an integration send commands. Grant it only to the users and integration users who should drive grids.
There is no per-grid opt-in: every grid listens to commands sent by a user with Create access.
Sending commands
From a Flow
Use a Create Records element on Grid Interaction Event, and set the fields above.
From Apex
From the REST API
Troubleshooting
Nothing happens
The user has the page open, and User Id is that user's 18-character Id. Grid Name, Grid Code and Object Name match the grid exactly. A blank Grid Code only matches a grid with no DataGrid Code.
Nothing happens from a screen flow
Command Type receives the picklist label instead of the command. Map it with a formula (see From a Flow). Reload the page after activating a new flow version.
Search does nothing
The grid has no Search fields.
The publish fails with a permission error
The publisher has no Create access on Grid Interaction Event.
The command runs twice
Remove GM - Grid Interaction Bridge from the utility bar.
Sort or grouping disappears
Expected: these commands are temporary, and a page reload restores the saved view.
Next steps
Command Bridge Demo
After configuring the GM - Grid Command Console flow and adding it above a GM - FieldSet Grid, you're ready to drive the grid with commands. The video below provides a step-by-step tutorial on how to use the Grid - Command Bridge 👇
Last updated
Was this helpful?