We have a requirement to allow the user to enter the amount of time before a record should be automatically deleted. I can record the date and time the record is created, and capture in a numeric field the amount of time (in minutes) before the record should be deleted, then I can add this to the creation date/time and determine the date and time at which the record should be deleted.
However, there is another requirement to display beside each record (on the web site) the amount of time remaining prior to auto-deletion.
My question then is how to update a field representing time_remaining via a trigger. On which event should this trigger be based?