Yesterday, I was asked why macros that seemed pretty straight forward and worked well in previous releases of Microsoft Dynamics GP, all in a sudden, seem not to work in Dynamics GP 10. Case in particular, a macro was previously written to automate the checklinks of the Sales Work table group and automatically close the application after completing the operation, but now seemed to hung when attempting to close.
After running a few tests, as I suspected, the reason Microsoft Dynamics GP is not quiting is 3-fold:
1) The Navigation Pane feature is an internal Dexterity window. When control is returned from the check links process, the focus is immediately returned to the navigation pane, not the work area form (BuiLtin form), causing the macro command to fail.
To fix this, the navigation pane needs to be disabled first when the macro begins its execution:
2) Macros and Progress Windows are enemies. This one is not new, however, it is a common occurrence since macros attempt to restore the focus to the progress window itself once the progress field vanishes (when it reaches 100%).
3) Report output to screen is also a point of failure for macros. The macro will need to bypass the screen output to a file if possible, since the Report output screen is an internal Dexterity window.
Saving to a file (appending always) will avoid trying to close the screen output window, hence cancelling interaction with the internal Dexterity form.
The following is the complete macro code:
Highlighted in red are the key aspects that need to occur in the macro to bypass any user interaction and for the macro to be successful in its execution; note the exclusion of the Progress_Control window. Highlighted in orange is the bypass of the screen output in favor of a less interactive file export.
Hope this helps all of you who are trying to figure out this new Dynamics GP 10 user interface.
Please drop your comments about this article.
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC