Easy
Creatio lets you use action menu that contains default actions for the list and list records or set up a custom action menu.
By default, the action menu for the list contains the following actions:
- Save list settings for all users
- Reset to default list settings
By default, the action menu for list records contains the following actions:
- Open
- Copy
- Delete
Set up a custom action menu
To set up a custom action menu for the list and list records:
- Open the Freedom UI page schema that contains the list.
- Go to the viewConfigDiff schema section and find the configuration object whose the type property value is "crt.DataGrid". The DataGrid component implements the List type component in the front-end.
-
Implement a custom action menu.
- Add the headerToolbarItems array of properties to implement a custom action menu for the list.
- Add the rowToolbarItems array of properties to implement a custom action menu for list records.
To add an item to the action menu, use the following properties:
- type. The registered name of the component to display in the action menu item. Use the "crt.MenuItem" value.
- caption. The text to display in the action menu item. Can be a constant or "#ResourceString(SomeLocalizableString)#" macro. SomeLocalizableString is the localizable string name in the schema of the Freedom UI page.
- icon. The name of the icon to display in the action menu item, for example, "edit-row-action". We recommend using the icon property values of the icon button. Learn more in a separate article: Button component.
- clicked. The action to execute on item click. Learn more about the clicked property in a separate article: Open a page from a custom handler. Set the useRelativeContext property to true for the rowToolbarItems array. Do not use the useRelativeContext property for the headerToolbarItems array. The useRelativeContext property specifies the ViewModel of a page or list record to use in the query processing.
View the example of the rowToolbarItems array of properties below. This example implements a custom action menu for list records.
As a result, the custom action menu for list records will contain only the Open item.
- Click Save on the Client Module Designer's toolbar.