Disabling F4 – Stopping inadvertent Delete

Can we disable the F4 function button in Navision?

Few years back, I had a situation in one of my implementation, where users used to delete the sales order inadvertently by pressing F4 (Their intention was to create a new order by pressing F3).

Now how to stop it. I had solved it in a very simple way by creating a new dummy menu item in one of the menu button present in the order window and assigning F4 as the shortcut key to that menu item. It just overridden the default F4 functionality (delete function). Here is how i did it –

Open the sales order form (Form 42) in design mode. Add a new menu item to the menu button ‘Order’ present in that form. Caption it as ‘Dummy’ and assign the shortcut key F4 to it.

Don’t write any code for this menu item. So nothing will happen if somebody clicks on it.
Now if somebody press F4, system calls that menu item ‘Dummy’ instead of default delete call and nothing happens for F4. And your default F4 is disabled.
Do you have a better solution? Do write to me.

7 Replies to “Disabling F4 – Stopping inadvertent Delete”

  1. Example, I have added an option under FORM Menu Button with Caption . , F4 as Shortcut Key and Action as blank (without running anything).

    Regards
    Mouli.K

  2. hi,

    you add f4 to any other functionality or just for assign it to any other thing in the form so that deleting won’t work

    Regards
    mouli

  3. Dear Alex,

    The purpose of this topic was not to disable delete but how to disable any default shortcut.

    You are right, if you want to disable delete, then, your method is the right one.

Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.