Macro Code changes regarding the new “Window Ribbon” - Dynamics GP 2013 R2 and 2015
With the new window ribbon introduced in Dynamics GP 2013 R2, we have seen a slight modifications on the commands used to deal with the window ribbon functions specifically. You might need to take a look at these modifications if you have a predefined set of macros that are used in different environment, because a macro recorded on a previous version such as GP 2013 will not run on GP 2013 unless these points are taken into consideration.
The modifications are primarily related to the following buttons:
- Save
- Clear
- Delete
- Post
- Clear
- Void
- Copy
- Correct
- View Currency
The switch is represented primarily between the [ MoveTo Field and ClickHit Field ] commands to the command execution [ CommandExec ], as shown below:
Helping Note !
The commands below represents “examples” taken from different forms. Unlike the old menu commands which can be used across different forms, the new ones can not be taken for granted and used for any form since the form is included in the command line.
Save Button
Window Command Display | Menu Bar
MoveTo field 'Save Button'
ClickHit field 'Save Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command 'Save Button_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Delete Button
Window Command Display | Menu Bar
MoveTo field 'Delete Button'
ClickHit field 'Delete Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command 'Delete Button_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Print Button
Window Command Display | Menu Bar
MoveTo field WindowPrint
ClickHit field WindowPrint
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command 'WindowPrint_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Post Button
Window Command Display | Menu Bar
MoveTo field 'Post Button'
ClickHit field 'Post Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command 'Post Button_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Clear Button
Window Command Display | Menu Bar
MoveTo field 'Clear Button'
ClickHit field 'Clear Button
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Account_Maintenance' command 'Clear Button_w_GL_Account_Maintenance_f_GL_Account_Maintenance'
Copy Button
Window Command Display | Menu Bar
MoveTo field 'Copy Button'
ClickHit field 'Copy Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command '(L) Copy Button_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Correct Button
Window Command Display | Menu Bar
MoveTo field 'Correct Button'
ClickHit field 'Correct Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'GL_Transaction_Entry' command 'Correct Button_w_GL_Transaction_Entry_f_GL_Transaction_Entry'
Void Button
Window Command Display | Menu Bar
MoveTo field 'Void Button'
ClickHit field 'Void Button'
Window Command Display | Action Pane
CommandExec dictionary 'default' form 'CM_Transaction_Entry' command 'Void Button O_w_CM_Transaction_Entry_f_CM_Transaction_Entry'
View Currency Button
Window Command Display | Menu Bar
MoveTo field 'Currency View Button' item 1 # 'F&unctional (US Dollars)'
ClickHit field 'Currency View Button' item 1 # 'item 1 # 'F&unctional (US Dollars)'
Window Command Display | Action Pane
MenuSelect title View entry 'Functional (US Dollars)'
Best Regards,
Mahmoud M. AlSaadi
*This post is locked for comments