More moments than I treatment to count I have been referred to as in to fix documents left behind since the Incorporate Totals and Deposits option was not marked when transferring a product sales document from an current buy to an invoice. The challenge is, it is so simple to forget to mark that box should you be undertaking this for numerous transactions fractured in many batches, especially in the conclude in the week when invoices should be submitted to customers, prior to the FedEx truck arriving at 4:00 PM.
Sales Transfer Documents window
While this "fix" has been provided as a Modifier with VBA project just before, I thought, why not truly prop this up a bit with a Support Debugging Tool non-logging trigger and take advantage from the Automatic Debugger Mode functionality? Well, I have done just that!
The first thing we need to have to do is setup the trigger itself. In this situation, we want to select a Focus Event trigger that will fire exactly on a field change condition. The field in question is the '(L) Purchase To Invoice CB' checkbox field. You can use the lookup button next towards 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
Since this will be a non-logging trigger,
Pandora Jewelry Sale, we will want to check the Do not activate Logging Mode selection about the window. And to make sure the trigger always starts up with Microsoft Dynamics GP, we will want to check the Start Trigger Automatically on Login alternative as well.
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. Should you happen for being running build 15 in the SDT,
Tiffanys, you can have a message display as a desktop alert around 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,
Pandora Jewelry Uk, we should add the processing script. The Support Debugging Tool does a really good job at providing a helper to build upon. So all we want to do is add the little bit to process the Incorporate 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,
Pandora Bracelet, 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
Since the goal is to have this trigger available at all instances,
Pandora Nz, there's no want to add a start and conclude date. It's now time to save the trigger and enable it.
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 while in the Automatic Debugger Mode Status window.
Automatic Debugger Mode Status window
This is truly all there is to it,
Pandora Charm Bracelets! The trigger need to 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 all 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 much more forgetting to mark Incorporate Totals and Deposits when transferring orders to invoices.
Include Totals and Deposits trigger - SOP_XFER.zip
The Support Debugging Tool's non-logging triggers functionality is a very powerful way to deploy easy 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 much more within the latest Support Debugging Tool build.
Until next post,
Tiffany Diamond Earrings!
MG.-
Mariano Gomez,
Tiffanys Engagement Rings is a great example of this. Sure, MVP
IntellPartners,
Discount Pandora Jewelry, LLC