web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to implement Keyboard shortcut keys on D365FO form custom button control?

(0) ShareShare
ReportReport
Posted on by 75

Hello AXperts,

I wanted to create an user defined keyboard shortcut, let's say if I press (ALT+ P ) it should click form custom pure button created using form extension.

I have already come across the below link but I am not sure how and where this can implemented. Can any AXperts provide an example or a pathway on how to achieve this user defined keyboard shortcut. Also is it possible only using JavaScript? How does the OOTB Keyboard shortcuts were implemented in D365FO forms, examples please.

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/user-interface/keyboard-shortcuts-controls#define-a-keyboard-shortcut

Shortcuts: {
    Save: {
        Keys: { ctrl: true, keyCode: $dyn.ui.KeyCodes.letterS },
        Handler: function (evt) {
            var control = evt ? $dyn.context(evt.target) : undefined;
            this.executeShortcuts(true, "SaveRecord", control);
        },
    },
    New: {
        Keys: { alt: true, keyCode: $dyn.ui.KeyCodes.letterN },
        Handler: function (evt) {
            var control = evt ? $dyn.context(evt.target) : undefined;
            this.executeShortcuts(true, "NewRecord", control);
        },
    },
    Delete: {
        Keys: { alt: true, keyCode: $dyn.ui.KeyCodes.deleteKey },
        Handler: function (evt) {
            this.executeShortcuts(false, "DeleteRecord");
        },
    },
    // Additional code
}

Other information:

Version : D365FO 10.0.11

Thanks Pradeep

I have the same question (0)
  • Anup Shah MSFT Profile Picture
    on at

    We have predefined short cuts, you mean to say create new one that are not already on this list: docs.microsoft.com/.../shortcut-keys

  • Pradeep Kumar Pachamuthu Profile Picture
    75 on at
    [quote user="Anup Shah"]

    We have predefined short cuts, you mean to say create new one that are not already on this list: docs.microsoft.com/.../shortcut-keys

    [/quote]

    Yes, need to create a new one (Alt+P).

  • Suggested answer
    vinitgoyal2005 Profile Picture
    6,332 on at

    Hi,

    This link you shared is for extensible controls. I don't think you can add a new shortcut for a particular button the way we used to do it in AX 2012 with keytip property.  

  • Arun Karnik Profile Picture
    57 on at
    Hello Pradeep,
     
    Were you able to achieve Keyboard shortcuts with this approach?
    We couldn't find all KeyCodes possible for this. Were you able to find any documentation for this?
     
     
    Thanks,
    Arun

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 611 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 529 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans