Home » Listing Details
Top Websites
  1. Dynamics GP Help
    Over 5800 resources listed.
  2. Mark Polino's DynamicAccounting.net
    Over 5100 resources listed.
  3. Rose Business Solutions Blog New
    Over 2200 resources listed.
  4. Developing for Dynamics GP - By David Musgrave and the MS GP Dev Support Team
    Over 1100 resources listed.
  5. Mariano Gomez at The Dynamics GP Blogster
    Over 900 resources listed.
  6. Microsoft Dynamics Partner Community Blog
    Over 900 resources listed.
  7. Christina Phillips, Steve Endow & Lorren Zemke at Dynamics GP Land
    Over 700 resources listed.
  8. Mohammad Daoud's Dynamics GP Blog
    Over 600 resources listed.
  9. Vaidy Mohan at Dynamics GP - Learn & Discuss
    Over 500 resources listed.
  10. Inside Microsoft Dynamics GP Official Blog
    Over 500 resources listed.
  11. eOne Business Solutions Blog
    Over 400 resources listed.
  12. About Dynamics, Development and Life
    Over 300 resources listed.
  13. Frank Hamelly at GP2theMax
    Over 300 resources listed.
  14. Dynamics CPM
    Over 300 resources listed.
  15. BKD Dynamics GP Insights Blog
    Over 200 resources listed.
  16. Leslie Vail at Dynamics Confessor Blogspot
    Over 200 resources listed.
  17. Victoria Yudin's Dynamics GP Website
    Over 200 resources listed.
    Victoria Yudin
  18. Janakiram M.P. at DynamicsBlogger
    Over 100 resources listed.
  19. VS Tools Forum
    Over 100 resources listed.
    Your Resource for Visual Studio Tools for Dynamics GP
  20. Inside Microsoft Dynamics GP Official Blog
    Over 100 resources listed.
  21. US Dynamics GP Field Team Blog
    Over 100 resources listed.
  22. Catherine Eibner MBS Developer Evangelist
    Over 100 resources listed.
  23. Sivakumar Venkataraman at Interesting Findings & Knowledge Sharing
    Over 100 resources listed.
  24. Dynamics Small Business
    Over 100 resources listed.
  25. Belinda, The GP CSI
    Over 100 resources listed.

ID:11373
Title:Macros in Microsoft Dynamics GP v 10.0
URL:http://dynamicsgpblogster.blogspot.com/2008/05/macros-in-microsoft-dynamics-gp-v-100.html
Description: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:

CommandExec dictionary 'default' form 'Command_System' command NavigationPane

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:

# DEXVERSION=10.0.193.0 2 2
CommandExec dictionary 'default' form 'Command_System' command NavigationPane
CommandExec dictionary 'default' form 'Command_System' command 'SY_Check_Links'
NewActiveWin dictionary 'default' form 'SY_Check_Links' window 'Check Links' ClickHit field 'File Series' item 2 # 'Sales'
MoveTo field Source item 0
ClickHit field Source item 19 # 'Sales Work'
MoveTo field 'Insert>> Button I'
ClickHit field 'Insert>> Button I'
MoveTo field 'OK Button'
ClickHit field 'OK Button'
NewActiveWin dictionary 'default' form 'Report_Destination' window 'Report_Destination'
MoveTo field 'Print to File' # 'FALSE'
ClickHit field 'Print to File' # 'TRUE'
MoveTo field 'File Export Name'
TypeTo field 'File Export Name' , 'test.txt'
MoveTo field 'Export File Type' item 0
ClickHit field 'Export File Type' item 1 # 'Text file'
MoveTo field 'OK Button'
ClickHit field 'OK Button'
# NewActiveWin dictionary 'default' form sheLL window sheLL
# ActivateWindow dictionary 'default' form 'Progress_Control' window 'Progress_Window'
# NewActiveWin dictionary 'default' form sheLL window sheLL
# Print To File: 'File Maintenance Error Report'
CommandExec form BuiLtin command cmdQuitApplication

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 blue 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.

MG.-
Mariano Gomez, MIS, MCP, PMP
Maximum Global Business, LLC
http://www.maximumglobalbusiness.com/
Category:CUSTOMIZATIONS: Macros
Link Owner:
Date Added:June 17, 2010 06:14:06 PM
Number Hits:127
RatingsAverage rating: (0 votes)
Reviews

No Reviews Yet.

 
GPWindow.com

Thank you for your support for GPWindow. It helps us cover part of the hosting costs for GPWindow.