Audit log deleted record script using original buttons
I've taken the audit log and approached it face on and tried to build something that works myself without buying expensive alternatives. Currently, to log a field name being changed from one value to another I have script triggers on both ObjectEnter and ObjectSave, one sets a variable on enter and another looks for the change of that variable to see if it can log a Audit Log record.
Now for Deleted Records, I want to store the name of the record that I have deleted within the AuditLog table, I've made my own Delete Button within the layout which performs the following script (not finished, after Go To Layout, I will obviously fill the Audit Log records) in short can I replicate the running of this same script but by using the normal New and Delete Record buttons that are already in the Status Toolbar?
You can if you have Filemaker Advanced. You can then set up a custom menu where a script of your own creation such as the one that you've posted is performed in place of the standard Delete Record menu option. This script can be set up to run when the menu options is selected, a tool bar icon is clicked and when the keyboard shortcut for the menu option is pressed.