Create a menubutton on the form. Put a menutitem in it with Shortcut-key F3.
Give a name to the menubutton.
In the OnOpenForm-trigger, give the properties Width and Height of the menubutton the value 1. This makes the menubutton virtual invisible and interecepts the F3 of the user.
BTW: you can also put property "InsertAllowed" of the form to No. 8)
Regards,Alain Krikilion No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But my problem is the following one. When the user want to insert a new contact he must introduce data in a new form.
When the user press F3 a new form opens. When the user close the new form the form of the contact continues waiting for a new contact and I want to cancel this action.
The user can push F3 but I, with code, must Cancel this action. When you push F3 and later you go to the last record, navision cancel de Insert trigger.
I believe that this problem will be solved if I can send a Escape to navision or end the trigger but I dont know How.
I just don't understand your problem. If you catch the F3 by having a menu item with shortcut to F3 running your custom form, Navi should not insert a new record. Does it really do that?
Comments
Give a name to the menubutton.
In the OnOpenForm-trigger, give the properties Width and Height of the menubutton the value 1. This makes the menubutton virtual invisible and interecepts the F3 of the user.
BTW: you can also put property "InsertAllowed" of the form to No. 8)
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
But my problem is the following one. When the user want to insert a new contact he must introduce data in a new form.
When the user press F3 a new form opens. When the user close the new form the form of the contact continues waiting for a new contact and I want to cancel this action.
The user can push F3 but I, with code, must Cancel this action. When you push F3 and later you go to the last record, navision cancel de Insert trigger.
I believe that this problem will be solved if I can send a Escape to navision or end the trigger but I dont know How.
Thank you very much,
Xavi
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!