What are actions and how can they enhance widget functionality?
Learn more about actions to enhance the widget functionality.
Dinesh
Last Update 3 years ago
One of the core features inbuilt within widgets is the ability to have custom actions. Custom action acts like a tool to execute a customized workflow with the context of some record. In this article, we will learn in detail how exactly actions work in a widget.
Overview
Action is workflow execution that can be triggered from supported widgets. You need to select the record to execute the action. Every action is executed in a single record context. A single widget can support multiple actions.
One of the examples of where this can be used is the refund amount for some transactions. We will be taking this as an example to explain how this action is created and used.
Actions
Action is a single workflow execution and in an ideal scenario, it performs a single action on a selected record. Here, in our example, it refunds the amount for the selected transaction.
Actions are not valid in all widgets. Hence, only a few selected widgets have the option to add actions. For example Board, Table and Gallery.

Creating an Action
Let us now quickly start creating the Refund action we see in the above image. Add a new widget that supports action. In our example, we have added a Table widget named Transactions and have configured a flow to fetch transactions data into the table.

Since we Refund action, we will create a flow that performs refund for a particular transaction by accepting a subset of available fields in the Transactions table. Click on the actions tab and start by clicking on add new action button.

Name the action you want to create and select the flow details. You need to map the flow fields using one of the Transactions fields available. You can leave fields empty if there is no valid mapping. Click on the Done button.

Action is now created and will be available when some of the rows are selected. Similarly, you can add multiple actions to a widget.
