Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Answered

X++ code on form method to use arrow down key on keyboard.

Posted on by Microsoft Employee

Hi all,

Are there any ways to write method on form for the keyboard arrow(up, down, left & right)? For example, moving from one field to next on the form? Primarily looking to use arrow down key instead of using tab key or mouse click?

Thanks in advance! Please let me know if I need to clarify further.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 228,112 Most Valuable Professional on at
    RE: X++ code on form method to use arrow down key on keyboard.

    You have to judge pros and cons by yourself. I'm just saying that I see many potential issues.

    Sometimes you want to do complicated things, because benefits would be much higher. I'm just not sure if this would be the case.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: X++ code on form method to use arrow down key on keyboard.

    Thanks Martin,

    So you are saying that it's better not to write such query. Just leave it the way it is?

    I was thinking that it might help our users enter records faster using arror down key.

    If it's going to interfere with other business logic then I'll leave it the way it is. Tab key & mouse click will do just fine.

  • Verified answer
    Martin Dráb Profile Picture
    Martin Dráb 228,112 Most Valuable Professional on at
    RE: X++ code on form method to use arrow down key on keyboard.

    You could overwrite task() method on the form and call some custom logic if, for example, _taskId = #taskArrowDown, (from Task macro library). Nevertheless you would have to be very careful not to break existing logic associated with the key, e.g. navigation in grids or opening lookups (Alt+DownArrow).

    Also don't forget that controls are not rendered in the same place every time.

    I would need a much better reason to start such an implementation.

Helpful resources

Quick Links

Dynamics 365 Community Update – Sep 9th

Welcome to the next edition of the Community Platform Update. This is a weekly…

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,263 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,112 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans