Menu

BETTER OPTION: Email notifications on Insert/Update/Delete

+1 vote

Simple email notification feature at the table level, where an email can be sent out on insert/update/delete of a table record with the details of the record that was changed, and maybe a URL that opens dbfront and takes the user to the table record in the email so they can review it.

in Features (Skip) by (160 points)
edited by
The way your request is described it would be more of an audit function.  Is that correct?  If so then I would suspect that the database might be the best place for that functionality since it has the best opportunity to capture 100% of the changes.

I was thinking that the email would only be sent out under specific conditions (i.e. field A = x and field B = y and db command = insert/modify). I agree that some kind of logging at the database level seems more appropriate for audit functionality, but one important use case would be to notify the user of a certain kind of log entry. For example where a process result gets logged in a SQL table, the user only wants to know if the Status = Failed for that day.

I handle emails regarding inserts/updates/deletes using SQL Database mail from SPs or Triggers. I find it gives me more control, especially when inserting or deleting transactions rather than just simple table rows.
Regards
Colin

1 Answer

+1 vote
 
Best answer

For the scenario you describe I would recommend that you send out those notifications via your database server.

The reasons are:

  1. Your database is in the best position to capture all database updates that should trigger the notification.
  2. The database has the capability to capture and format the records that need to be sent.
  3. If needed dbFront can save the currently logged in user as part of any record updates. See: https://dbfront.com/auditvalues

You can setup your database server to mail as follows:

NOTE: Another feature request exists for emailing Action Button results. Action Button Email

by (65.1k points)
selected by
That makes sense, I'll try that. Thanks Anthony
Welcome to the dbFront Q&A site, where you can ask questions and receive answers from other members of the community.
 | Minimalist Answer Theme by Digitizor Media
 |
Powered by Question2Answer
...