Hello,
I'm trying to "intercept" a record deletion on a table and log the attempt instead. Here is what I've done:
On the "choose fields" page, I added three fields to the list page - Deleted, DeletedOn, DeletedBy (these are fields in the table I am working on).
Then in the visual editor I remove these colums (so as not to confuse the user)
Then on the events tab in list page/before record deleted I added this code:
dict("Deleted") = "1"
dict("DeletedOn") = Now()
dict("DeletedBy") = Session("UserID")
BeforeDelete = False
On the list page, when I select a record and click "delete selected" I get no errors, the record isn't deleted (which is good), but the 3 fields are not updated.
Can I not do this on a list page? Do I need an SQL update statement? If so, how would I set the "where" statement to update only selected rows?
Thanks,
Tim