How to use keyboard stroke to write code in navision

Sometimes you find the thing difficult until you do not do it. Here i am going to tell you how you will use keyboard in navision code. User demanded that when they open the page then cursor should be on specific place. Since i hadn't done this before so it was challenge for me. when i open the page then by default cursor was on the another place and when i click on SHIFT +F6 then cusrsor come to the place where user want. so now i have to try when NAV open then SHIFT +F6 will press automatically. so i wrote some code on the On Open trigger of the page and below are the code. May it will be helpful for you.


IF ISCLEAR(WSHShell) THEN

    CREATE(WSHShell,TRUE,TRUE);
 WSHShell.SendKeys('+{F6}');

WSHShell        Automation           'Windows Script Host Object Model'.WshShell

Comments

Popular posts from this blog

How to create NAS service in NAV 2009 R2