Press Enter in Sales & Purchasing Documents
Mark Hageman
Hello,Is there a way to change the behaviour of pressing Enter in an Sales or Purchasing document? Like press Enter to go to the document line and press ctrl-enter to close the document?
Greetings Mark
Rafael Stalder
Hi Marki'm not sure. But i think you need the KeyDownEvent. (Before Event).
And then you have to check the ActiveForm and the Key wich you've pressed. (Enter)
So you have to set "bubbleEvent = false" to abort the "normal" event of the Enter-Button. Now you can set your cursor in the document line.
You can use the same event for ctrl-enter, so you can close the form by the code.
Form.Close().
Hope it works
Greetings
Rafael
Manuel Marhold
Hi.Form.Close() closes the form withour saving, so be careful! If you want to run the normal ENTER-Event (Pressing button "Add"/"Update" (ItemUID "1")) on STRG-ENTER you must not use Form.CLose(). Use Button.GetFromUID(ActiveForm, "1").Click instead.
0
Please sign in to leave a comment.
Comments
0 comments