Context
This is the official documentation of Forest Admin Cloud.
The context
of an action contains all the context data when the action is executed in Forest Admin.
To make the code easier to read, all the code snippets below should be wrapped in the following code. Ensure you update the collection and action names as needed.
Getting the selected record(s)
To get the selected record(s) on which the action is executed, use the getRecord()
or getRecords()
methods from the context.
Example:
Getting the selected record id(s)
Additionally, you can retrieve just the id(s) by using getRecordId()
or getRecordIds()
Example:
Getting the collection
To access the collection associated with an action, use the collection
attribute. To see the capabilities of what collection
provides, please see the following section: Query interface and Native Queries
Example:
Last updated