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

Announcements

No record found.

News and Announcements icon
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

  • Anup Shah MSFT Profile Picture
    Microsoft Employee 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 543 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 387 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 185

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans