Skip to main content

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 NameDescriptionData TypeRequiredExample
nameUnique identifier for the command.stringyes"createIssue"
labelDisplay text for the command in the UI.stringyes"Create Issue"
typeCommand type (e.g., form 1) launchFormAsModal this is used to popup form with data.genericService without form perform action behind service call trigger.stringno"launchFormAsModal"
settingsConfiguration specific to the command type.objectno{"config": {"type": "form", "id": "createNewIssue"}} or {"relatedConfig": {"name": "CreateChangeRequest"}}
isMenuDisplays as a menu if true. Defaults to false if omitted.booleannofalse

Command settings properties

Below sub elements define how command settings should be configured

Property NameDescriptionData TypeRequiredExample
refreshBehaviorDefines 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").stringno"settings": { "excludeHiddenColumn": true, "relatedConfig": { "services": [ { "name": "createAndConnectIssueService" } ], "context": "", "refreshBehavior": "refreshRow", "columnsMapping": [ "related_issue" ] } }
relatedConfigDefines how object will be connected to context objectobjectno
serviceControls if to select data from nodes or edges in dataset.booleannotrue
useSavedContextIdBoolean indicating if a saved context ID should be used (e.g., true).booleannotrue