![]() |
Sales Transfer Documents window |
While this "fix" has been provided as a Modifier with VBA project before, I thought, why not really prop this up a bit with a Support Debugging Tool non-logging trigger and take advantage of the Automatic Debugger Mode functionality? Well, I have done just that!
The first thing we need to do is setup the trigger itself. In this case, we want to select a Focus Event trigger that will fire exactly on a field change condition. The field in question is the '(L) Order To Invoice CB' checkbox field. You can use the lookup button next to the Form Name field on the Resource tab to open the Support Debugging Tool's Resource Explorer window and locate the field and select it.
![]() |
Trigger Setup |
Second, we can choose to have the Support Debugging Tool perform certain actions when the event fires - the event being when the checkbox is marked. If you happen to be running build 15 of the SDT, you can have a message display as a desktop alert on the lower right corner of your screen, similar to when you receive a Microsoft Outlook message.
For the purpose of this trigger, we will not take any actions when the trigger fires.
Third, we must add the processing script. The Support Debugging Tool does a really good job at providing a helper to build upon. So all we need to do is add the little bit to process the Include Totals and Deposits checkbox field, after the Transfer to Invoice checkbox has been marked. This is the final script:
![]() |
Trigger processing script |
Finally, since this is a non-logging trigger, the Options tab will show all logging options disabled. However, you can still choose a date range for this trigger to take effect.
![]() |
Options tab |
We can choose to turn on our Non Logging Automatic Start Only triggers. Since our SOP_XFER trigger has been marked as a non-logging automatic trigger we should be able to see it in the Automatic Debugger Mode Status window.
![]() |
Automatic Debugger Mode Status window |
This is really all there is to it! The trigger should now cause the Include Totals and Deposits checkbox to activate automatically when we choose the Orders to Invoices checkbox.
I have attached the configuration file to be imported with the Support Debugging Tool's Configuration Export/Import window. Once you import the XML file just activate your trigger as indicated above and you should be good to go. No more forgetting to mark Include Totals and Deposits when transferring orders to invoices.

The Support Debugging Tool's non-logging triggers functionality is a very powerful way to deploy simple scripts that can take care of every day headaches. All you need is a bit of creativity and the tool itself - see David Musgrave's article Support Debugging Tool Build 15 released for more on the latest Support Debugging Tool build.
Until next post!
MG.-
Mariano Gomez, MVP
IntellPartners, LLC
http://www.IntellPartners.com/
5 comments:
Mariano - This is fantastic. Although I have tested using non-logging triggers in the past in test environment, I have not yet deployed this in the production environment. I don't think there should be a problem - but what are your views ? Have you started deploying solutions based on this in production ?
Jivtesh
Jivtesh,
I tend to use the Support Debugging Tool to its fullest extent, so simple solutions like this get deployed very often. Also keep in mind that the code is not stored in a dictionary, but rather in the XML configuration file. This makes deploying code a very palatable proposition for companies looking to minimize their customizations footprint.
MG.-
Nice article Mariano! Very handy functionality
Love the tip. This was the first trigger I loaded into Support Debugging Tool. Should triggers be moved to another location eventually? If so, where? Or does SDT work as a permanent solution? I have built additional triggers and wonder if it causes a drag on resources, especially at startup, by leaving them in SDT versus another location.
Tom
@Tom:
The only other location you can move them to is an actual Dexterity dictionary. No, they don't cause a drag on resources, not anymore than a dictionary would.
MG.-
Post a Comment