On layout events ther is the "OnRecordCommit".
How do I know if the Commit refers to an Insert, Update or Delete event?
I'd like to intercept the Delete event, so I'd be able to deny it (if needed).
What do you consider the difference between "insert" and "update"?
A record can be deleted without triggering the onRecordCommit trigger. The trigger will only be fired if the record being deleted is open and has unsaved changes.
Use record level access privileges to "deny" the delete rather than using script triggers. For the user's privilege set, make the delete privilege limited to whatever the "if needed" criteria is. I do this often to prevent records from being deleted if they have any related records.
You can capture the delete event by adding a script trigger plugin to the table's security definition calc. Or you can use custom toolbars to redirect the Delete command to a script where you control the process.
Thanks to both of you.
I'm used to MS Access (yeah, I admit it!!) where the all the three situations (create, update, delete) are captured as different events (before delete, before update, etc) and there are still a few things where I can't even imagine the power of FMP!
One of these is allowing conditioned deletion at privileges level!
Retrieving data ...