Developing for Dynamics GP

by David Musgrave (Perth, WA, Australia) and the Microsoft Dynamics GP Developer Support Team (Fargo, ND, USA)

Using the Support Debugging Tool to create temporary fixes

Using the Support Debugging Tool to create temporary fixes

  • Comments 4

David MeegoThe Support Debugging Tool for Microsoft Dynamics GP has the facility to create non-logging triggers.  This are Automatic Debugger Mode triggers that do not automatically start and stop the Dexterity and SQL logging.

Non-logging triggers have two purposes, they can be used when looking for the cause of issues to execute additional code to help with the debugging work, for example: reading data and storing it in the log for later analysis; or popping up a dialog to confirm a particular piece of code has been executed.

However, they can also be used to execute additional code that can be used to temporary fix an issue or quickly prototype code for a permanent fix. Once the temporary fix has been tested, it can be used while a more permanent solution is developed.

From Build 11 or later non-logging triggers have the option to execute reject script (on focus events before the original) or reject record (on scrolling window fill events) commands to stop further processing of the original code.


One issue I have come across a number of time recently is related to setting up Named Printers on a Terminal Server.  The following post highlights how changing the Printer Class drop down list on the Assign Named Printers Window will remove all the existing settings for the old class in preparation to enter new settings for the new class.  This can cause all the settings for other users or users & companies to be lost without warning. [Edit: This issue is fixed in Microsoft Dynamics GP 2010.]

Using Named Printers with Terminal Server

I have requested that a warning dialog be added to prevent this accidental data loss, but in the meantime have developed a temporary fix using the Support Debugging Tool and a non-logging trigger.  Below is a screenshot of the settings used as well as the script.  Before you manually add this into your system, you can download the settings file from the attachment linked to the bottom of this article.

Named Printers Fix

Below is the script used. Note that OUT_Condition is set to true when the dialog is displayed and the user decides not to continue. As we have marked the Reject Script option, this tells the Support Debugging Tool to prevent the original code from being executed.

Script for Named Printers Fix

Note: The Reject Script functionality requires Build 11 or later of the Support Debugging Tool to be used.

This code will pop a dialog to prevent accidental data loss and allow the user to prevent the change to the Printer Class drop down list.

The settings file suitable for v8.0, v9.0 and v10.0 is attached to the bottom of this article. Use Configuration Export/Import to install the file.

For more information on the Support Debugging Tool, please look at the articles below:

For other related articles and posts have a look at the Support Debugging Tool Tag page.

David

12-Mar-2011: Added note that the issue is fixed in Microsoft Dynamics GP 2010.

Ref: CR 6263, PR 52336

Attachment: Debugger_Settings_NamedPrinters.dbg.zip
Page 1 of 1 (4 items)
Comments Information

PLEASE READ BEFORE POSTING

Please only post comments relating to the topic of this page.

If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.

Leave a Comment
  • Please add 6 and 2 and type the answer here:
  • Post