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.

6 comments:

Anonymous said...

Of course I have a better one. Just set the form's DeleteAllowed property to False/No

Anonymous said...

how to disable F1 in navision ?

Unknown said...

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.

Anonymous said...

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

Anonymous said...

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

Anonymous said...

Sir,

Is it possible to disable CTRL+O functionality in navision.


Manas Mondal