I created a Custom Button on the table toolbar with a "Click Toolbar" event handler which triggers a sql delete query. This seems to be triggering the delete query whenever any other toolbar button, i.e. "Save" is clicked.
Hi @dman,
Do you mind sharing a couple of screenshots?
What do you mean by a "Click toolbar" event handler?
I found that by creating a confirmation message in the Advanced tab of the query, the button now works as expected. Some kind of async issue, I suppose?
Although the confirmation message is a great idea to prevent accidental deletions, the button should work as expected without it. On the other hand, if the button is to delete a row, wouldn't it make more sense to add the button as a row action?
@Paulo Is there any technical difference between the method OP used, and the method you referenced (row action > event handler > run SQL to delete row)?
No technical difference. They trigger the same query and provide the same outcome. Having the row action just makes the action more visible, and prevents users from accidentally deleting the wrong row by keeping their eyes on the target.