Commands
Commands
Commands are bound to toolbars, defining menu actions and their execution logic. Each toolbar menu item specifies which service to execute or what action to perform, such as opening a form in a modal, adding a new object, or deleting a selected row. Commands include a settings configuration where you can define the related service and refresh behavior based on the use case.
"commands": {
"csvExport" : {
"type": "export",
"label": "CSV Export",
"settings": {
"columns": ["title", "description"],
"excludeHiddenColumn": true
}
},
"createNewCR" : {
"type": "genericService",
"label": "Create Change Request",
"isMenu": false,
"settings": {
"relatedConfig": {
"services": [
{
"name": "CreateChangeRequest"
}
],
"useSavedContextId":true,
"refreshBehavior": "removeRow"
}
}
},
}
Command properties
| Prop Name | Description | Data Type | Required | Example |
|---|---|---|---|---|
name | Unique identifier for the command. | string | yes | "createIssue" |
label | Display text for the command in the UI. | string | yes | "Create Issue" |
type | Command type (e.g., form 1) launchFormAsModal this is used to popup form with data.genericService without form perform action behind service call trigger. | string | no | "launchFormAsModal" |
settings | Configuration specific to the command type. | object | no | {"config": {"type": "form", "id": "createNewIssue"}} or {"relatedConfig": {"name": "CreateChangeRequest"}} |
isMenu | Displays as a menu if true. Defaults to false if omitted. | boolean | no | false |
Command settings properties
Below sub elements define how command settings should be configured
| Property Name | Description | Data Type | Required | Example |
|---|---|---|---|---|
refreshBehavior | Defines how the UI refreshes after execution. Possible values :"refreshRow": Refreshes the selected row."refreshParents": Refreshes parent rows."refreshRowWithColumnService": Refreshes the row using a column-specific service."expandRowWithService": Expands the row using a service."removeRow": Removes the selected row (e.g., as shown in "createNewCR"). | string | no | "settings": { "excludeHiddenColumn": true, "relatedConfig": { "services": [ { "name": "createAndConnectIssueService" } ], "context": "", "refreshBehavior": "refreshRow", "columnsMapping": [ "related_issue" ] } } |
relatedConfig | Defines how object will be connected to context object | object | no | |
service | Controls if to select data from nodes or edges in dataset. | boolean | no | true |
useSavedContextId | Boolean indicating if a saved context ID should be used (e.g., true). | boolean | no | true |