This functionality can be achieved by using the Events option in the table maintenance generator screen of a table.
Here we have predefined events like Before saving the data in the database,Creating a new entry,Before deleting the data displayed etc., for which we can define a FORM and write the logic for the required functionality in the form.