Going on two years ago, I created a series of Microsodt Dynamics GP macros that perform (for three GP companies at this client) reconcile overnight for Sales Order Processing, Purchase Order Processing, and Inventory. These macros have been running nicely and have definitely gotten the job done. This client has a heavy inventory volume, and the only way to keep the numbers in inquiries and reports to be accurate is to have GP reconcile itself every single night! Yep!
Anyway, the macros login a "ghost" user at night in GP called "admin1". After logging in, this GP user clicks a macro shortcut on the navigation pane. That macro shortcut, then, runs one of the reconcile processes.
You see, there are three companies and three reconcile processes for each. So, that's nine macros (i.e. nine macro shortcuts).
One of the items in the attached file is a screenshot of one of those stupid "inconvenience" error messages saying that GP has encountered a problem and needs to close.
This error happens, basically, right after the ghost user logs in and immediately after GP has finished refreshing itself. So, it happens just before the "admin1" user has a chance to click any of the macro shortcuts.
I have a dexsql.log attached, if that helps.
I, also, removed any dictionaries or files referencing this module and got the same error.
The funny thing is that this error does not happen if I login as this "admin1" user manually. It only happens when this macro runs!
So, somewhere, it's as if control or something to the GP "code" is being lost when the macro(s) run.
I did grant Full Control to the GP code folder and to the folder containing these macros files. No luck.
Also, in case dictionary corruption had anything to do with it, I temporarily pointed the settings in the dynamics.set file locally. Still, no luck.
By the way, I have also attached "dexsqllog2" which I created while manually logging into GP (i.e. without this error occurring). Perhaps, you can compare the two dexsql logs to see what the deal is.
In addition, I have attached a file that run one of these nine reconcile processes. This file runs Sales Order Processing reconcile for a company called "PAPER". So, now, you have the *.txt file that Windows Task Scheduler uses to run this macro. And, two *.txt files that you see are (a) the macro that logs admin1 into GP and (b) the shortcut macro from the Navigation Pane that runs the Sales Order Processing reconcile itself.
I did all kinds of other troubleshooting but to no effect. I increased security temporarily to admin1 by granting it POWERUSER status. Still got the error.
The only thing that I did not try is "Repair" from Control Panel. But, honestly I'm afraid to do that as I do not want to screw up this install. This is a Terminal Server box that others use throughout the day and I don't want to have to reinstall to fix.
Like I said, these macros have been running fine for almost two years now up to this point.
Moving these files to another station is not an option. Microsoft Windows engineers told me two years ago that the only way that Windows Scheduler can run GP macros is to have these macros (along with Windows Scheduler) run on either a Windows Server (Term Server) 2003 box or a Windows XP box. Server 2008, Vista, and Windows 7 cannot automatically run GP macros through Windows Scheduler. And, this is the only old 2003 box that the client has.