Deleting a record in a form without confirmation.

Hi, ist this possible? When I delete a record in a form, I get the question window (Delete this line [YES/NO]) After selecting YES, the code behind the form’s “OnDeleteRecord” - code block is executed. Any way to disable this window? I’d like to run my own code in “OnDeleteRecode” to ask this question in a different way…

A trick can be to set the property DeleteAllowed on the form to No. Next you can add a menu item “Delete record” and use ShortCutKey F4. In the OnPush of the menu item you can put the CONFIRM you want. Don’t know if you can change the code under the Delete (F4) button… I guess not.

quote:

A trick can be to set the property DeleteAllowed on the form to No. Next you can add a menu item “Delete record” and use ShortCutKey F4. In the OnPush of the menu item you can put the CONFIRM you want.

That trick works. Thanks!

Nice. [8D] You’re welcome! Off course the disadvantage is that users can’t use the Delete-button… Or the Delete-function in the menu… Another reason for mouse-users to become keyboard-users! [;)]

Would it work if you put that code in a menu button selection, and put F4 as the shortcut key? The only thing that would leave is the standard Navision delete button.

http://www.mibuso.com/forum/viewtopic.php?t=2348&start=0&postdays=0&postorder=asc&highlight=delete+confirm

quote:

The only thing that would leave is the standard Navision delete button.
Originally posted by DenSter - 2005 Nov 16 : 12:41:15

Take a look at the first reply on this post. [;)]