Featured Post

Dynamics GP 2018 - Upcoming Features

We are counting the days for Dynamics GP 2018 release which is promising to introduce a new set of features that have been highly recogniz...

Sunday, February 1, 2015

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.

Old menu

1422816052_arrow_down

New window ribbon

The modifications are primarily related to the following buttons:

  • Save
  • Clear
  • Delete
  • Post
  • Clear
  • Print
  • 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:

 New Window Ribbon Command

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

7 comments:

  1. I created a people (payroll) in GP then SQL trigger insert a record in eConnect_Out table then Service "eConnect Outgoing Service for Microsoft Dynamics GP 2013" is picking from eConnect_out table

    Once Outgoing Service pick the data from eConnect_out table the datas are deleted from eConnect_out table...no message (in the form of XML) is going to the MSMQ queue.
    No error in eventlog eConnect

    ReplyDelete
  2. If I combine 2 macros, one that prints a quote and the other that prints an order, how can I get the macro to ignore the inactive of the 2?


    EXAMPLE:

    MoveTo field '(L) Print Quote CB' # 'FALSE'
    ClickHit field '(L) Print Quote CB' # 'TRUE'

    MoveTo field '(L) Print Order CB' # 'FALSE'
    ClickHit field '(L) Print Order CB' # 'TRUE'

    ReplyDelete
    Replies
    1. I personally prefer the Excel-based macro, which includes the predefined data set, on which you can add excel functions to your Macro, such as
      IF(Cell X ='Inactive', Cell B (which contains the code of the print order), else Cell C (which contains the code of the print quote))
      In this case, the cell X on the excel sheet practically contains the piece of information on whether which document is inactive.

      Delete
    2. So, how do I use an Excel macro in DGP, or record a macro to excel, or use the information in my DGP macro to create an Excel-based macro. I didn't know I could use a different type of macro.

      Delete
    3. I am afraid I won't be able to provide you with the sufficient details through a simple reply, for that I will provide a detailed article on how to use the Excel-based macro, practically it is not another type .. it is just a different method than using the the word mail merge functionality to generate the code.

      Meanwhile, please let me know if I could provide any valuable assistance,

      Delete
  3. This comment has been removed by the author.

    ReplyDelete