What is an action?
An action is a button that triggers server-side logic through an API call. Without a single line of code, Forest natively supports all common actions required on an admin interface such as CRUD (Create, Read, Update, Delete), sort, search, data export, and more.Native actions vs Smart Actions
In Forest, all the available actions can fall into 2 categories.Native actions
Those actions come out-of-the-box. We’ve covered them in details from a route perspective in Routes. The most common ones are:- Create: create a new record in a given collection
- Duplicate: create a new record from an existing one
- Update: edit a record’s data
- Delete: remove a record
Some actions are only available when 1+ record(s) are selected. This depends on their type.
Smart Actions
Smart actions are your own business-related actions, built with your own code. You’ll learn how to use them in the following page.Smart actions can be triggered from the Actions button or directly from a Summary view.
Triggering different types of actions
Triggering an action is very simple, but the behavior can differ according to the type of action. There are 3 types of actions :- Bulk actions: the action will be available when you click on one or several desired records
- Single actions: the action is only available for one selected record at a time
- Global actions: the action is always available and will be executed on all records