On Click
Last updated 25/07/2025
This documentation will demonstrate how the On Click event works. The On Click event is a client-side event and only supports a _Button display type. When the button is clicked, the function attached to the On Click event will execute.
tip
If you require a backend function to work with the On Click event, you can call it from the frontend using Five's
executeFunction()
function!The Orders application is used to demonstrate the On Enter event.
Execute an On Click Event
The
SelectProducts()
function uses the selectAction()
function on the Five
object in the format five.selectAction('FormActionID')
This will select the list of Product records when the field with the _Button display type is clicked.
Select the list of products
function SelectProducts(five, context, result) {
five.selectAction('Products');
return five.success(result);
}
The
SelectProducts()
function is saved in the Functions view.

Figure 1 - SelectProducts function
The See Product List field on the Customers form has a _Button display type.

Figure 2 - See Product List field
The
SelectProducts()
function is attached to the On Click event for the See Product List field.

Figure 3 - On Click field
In the Orders application on the Customers form, when the See Product List button is clicked, the On Click event executes the
SelectProducts()
function which will
select the list of form records for the products in the system.
note
You may need to refresh your screen to see the gif.

Figure 4 - On Click event