It is for a terminal Dialog (time Registration) that Needs to be built in the Windows client. In the old NAV version (Classic Client) that the customer used before, there was a form with big text boxes and Buttons. Now with the pages the standard layout/design possibilities are limited so in order to have the same big text boxes and Buttons my colleague used the uniwpf-client-addin (see https://uniwpfaddin.codeplex.com/). Now when you type something into the TextBox, an Event is fired and in the control-addin-Trigger you can respond to this Event using C/AL code. In the text box the employee no. can be typed in. Our customer will also use Scanners to scan the employee no. and then the scanner will also send ENTER in order initiate the process. The Problem is, that the event for this text box is fired every time a single character was entered. Now I want the process to be initiated only when the ENTER key was sent. Only then the employee no. is complete and I can use it. That's why I am looking for a way to find out whether the ENTER key was pressed. The C/AL code I want to write for this purpose is in the Control-addin-Trigger. Thank you for any suggestions.
1) I am happy that someone is using the addin... ;-)
2) Try to use another event on the textbox. I do not know which you are using now, you can try to use KeyUp/KeyDown event. If this event is not supported in the project by default (the KeyEventHandler type is unknown for the addin), the code of the addin could be extended by this event type. Passing the args back to NAV will give you scan code of pressed key.
Thank you very much for the input. I have implemented the code (see lines marked in yellow in the attached Word document). But somehow the code is not triggered. Im I missing something?
Best regards,
MACL2
Comments
There might be NAV ways of doing, what you need to do.
2) Try to use another event on the textbox. I do not know which you are using now, you can try to use KeyUp/KeyDown event. If this event is not supported in the project by default (the KeyEventHandler type is unknown for the addin), the code of the addin could be extended by this event type. Passing the args back to NAV will give you scan code of pressed key.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thank you very much for the input. I have implemented the code (see lines marked in yellow in the attached Word document). But somehow the code is not triggered. Im I missing something?
Best regards,
MACL2
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.