Skip to main content

On Finish

Last updated 26/03/2026

Overview​

The On Finish event is a client-side event that executes after the top-level form and all its sub-forms have successfully saved. This occurs when all data has been updated and persisted, allowing the application to perform final actions or cleanup once the entire form operation is complete. If using with the On Complete or Do Complete functions, On Finish is the final event called.

How it Works​

When the form save operation completes:

  1. After all forms and sub-forms have been committed to the server.
  2. The On Finish client-side event executes.

Use Cases​

  • Triggering notifications or alerts after the form is fully saved
  • Redirecting the user to another page or section
  • Performing final calculations or updates that depend on all the data being saved
  • Logging, auditing, or cleanup operations

Example​

This function executes when the form is fully saved, displays an alert, and resets a temporary variable used during the form process.

JavaScript
Set record edit timestamp
function onFinishEvent(five, context, result) {
five.setVariable('TempFormState', null);
five.alert('Form has been successfully saved!');
return five.success(result);
}