I’ve seen this question several times over the last few months and typically happens after a customer updates their GP from 2010 to a newer version.
I’ll get a screenshot like this (boxes added by me for later clarification)
Fig 1: GP 2010 with Accelerator keys visible for GP windows
and a message similar to this:
I have just updated from GP 2010 to GP 201x and have seem to have lost my accelerator keys for Extender Windows. The Additional menu used to look as above on GP 2010 and now they are missing for Extender on GP 201x as shown below. How do I make them show again for Extender?
Fig2: GP 2018 with same Products/Extender Windows and not showing accelerator keys
If we look at the GP 201x screenshot above, indeed we do not see the Ctrl+O accelerator for our Order Info Extender Window – but we don’t see the accelerator keys for the GP Manufacturing windows either (in section #2 in the first screenshot) and for the same reason.
That reason this happens is because this is a bug that was introduced in Dexterity/GP 2013 R2 with the Action pane. With the bug, Accelerator Keys in the Extras window do not appear properly (but still work!) with the menu set to Action Pane in the User Preferences window.
Fig3: GP User Preferences for the menus
The easy answer to resolving this issue is that the user can set their User Preferences to be “Menu Bar” which gives the user the menu style pre-GP2013 R2. I know this works because I cheated in my first screenshot and set it that way to get the “GP 2010 menu” above. To be honest I’m not sure what would happen if it is set to Action Pane Strip – I’ll leave that up to the reader’s exercise.
But since this is a bug in Dexterity/GP affecting any application (including Extender) we’re stuck and so my only possible answer could be: Switch to Menu Bar, bother Microsoft long enough to fix the bug (since they can repro with Manufacturing as above and isn’t an “Extender Issue”), or live with it.
But I got this question again right after I wrote this blog article that discussed the Additional Menu items and it got me to thinking. In that previous article, we inspected the menu names and looped through them until I found the one I wanted. Why couldn’t I do the same but change that menu item name? Seems like that should be possible – in theory.
As it turn out, this was actually easier than I thought it would be. Like before, you have to know a lot about Dexterity and command based menus – but I already had a good chunk of the code to find the Additional menu itself and loop through the items done from the previous article. The key accelerator information is part of the menu command already (just not visible in the menu itself) – so that wasn’t difficult to get either. As a bonus, since it WAS available, that meant that we could fix all of the menu items for a window and not just the Extender information.
As it turns out, just as tricky was formatting for the menu itself.
My initial thought was – just pick a good length to make the menu item and then pad the menu name out to a certain amount of spaces. Then tack the accelerator key information onto that – easy.
Well, except it looked like this when finished:
Fig4: accelerator keys filled with spaces
The reason the accelerator keys show misaligned is because GP/Dexterity appears to use a proportional font and not a fixed font. So a bunch of blanks takes up less space than characters and a “W” takes up more space than “i” on the menu. We can see that easily towards the bottom where “SOP” takes up about the same number of pixels as “Sale” from “Sales” below it. I though about that issue a bit and decided that I wasn’t going to tackle that. But after switching the custom code to append the accelerator key directly after the item name, it looks like this:
Fig5: Accelerator keys filled appended after menu item name
While that works, GP draws the menus per window and so in order to fix the accelerator keys as we did in this example, we’d have to make a separate action per GP window fixed.
In order to create this Action/Script in Extender Enterprise, you need an action (Extender | Actions) on the window you want to target – Sales Transaction in this case – that runs when Opened and then a Dynamics GP Script action per below.
Fig6: Extender Enterprise action definition
Once you have that, the script for the sample can be downloaded here. The only thing you would have to change is that since the GP menus are per window, you would have to change the name of the window you want to “fix” in the script as well in the spot that is commented in the code.