Solved

Dynamics GP Macros No Longer Work Due to Error

Posted on 2011-03-07
13
1,966 Views
Last Modified: 2013-12-11
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.
Inconvenient-on-a-Saturday-Morni.docx
DEXSQL.LOG
DEXSQL2.LOG
GP-Login-Sales-PAPER.txt
Sales-Reconcile-PAPER.txt
PAPERSales.txt
0
Comment
Question by:apitech
  • 6
  • 5
13 Comments
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35063190
Before I read all of the attached documents, could you try this:

Re-record the same macro from scratch and see if you would face the same issue.

Please update us.
0
 
LVL 1

Author Comment

by:apitech
ID: 35108285
Hello:

Yep, I still get the issue.  I, also, tried GP on other installs with this macro.  Same issue.

And, this AM, I installed a fresh copy of GP on another workstation.  I got a slightly different error:  "Cannot open macro file".

I don't get it.  The macros were working for years, and now they're not.

Could a Microsoft Windows update have messed this up?
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35108424
Could you post the macro file please?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 1

Author Comment

by:apitech
ID: 35110941
I did, earlier in this case,
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35113199
I need the new Macro file.
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35113206
Which GP version?
0
 
LVL 1

Author Comment

by:apitech
ID: 35116672
It's GP 10.0 service pack 4.  You had asked for the "new" macro file.  There is no new file.  I haven't changed anything.  So, I'm afraid that I'm unclear on the request.  The files that I attached to this case, originally, apply.
0
 
LVL 10

Expert Comment

by:Abdulmalek_Hamsho
ID: 35117408
I requested you to re-record the macro from scratch, because the attached macro "Sales-Reconcile-PAPER.txt" is not complete. The beginning of the file is wrong.
0
 
LVL 1

Author Comment

by:apitech
ID: 35117441
No, actually, that is the way the file is.  You see, it has always worked and was designed just like that.

It's just that the other attached .txt file (which is actually a .mac file) runs before the sales reconcile macro runs.  The sales reconcile macro in GP is in GP's shortcut and the first macro that I speak of logs a user into GP and clicks on this sales reconcile macro file.
0
 
LVL 10

Accepted Solution

by:
Abdulmalek_Hamsho earned 500 total points
ID: 35117476
I know, could you please simply re-record the "Sales-Reconcile" macro? (Remember to close all of the Dynamics GP windows, just keep the home page, start recording, reconcile sales and stop recording).
0
 
LVL 1

Author Comment

by:apitech
ID: 35121291
Actually, the issue is with the first macro--the macro that logs the user into GP and clicks on the shortcut macro.  You see, at the point where the sales macro is clicked on, the error happens.  And, according to the macro.log file, the error occurs on line 21 of the first macro which is the following:

ShellCommand 'Navigate to \cmdListShortcutBar\~"PAPER Sales Reconcile Macro~"' # PAPER Sales Reconcile Macro
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
We were having a lot of "Heartbeat Alerts" in our SCOM environment, now "Heartbeat" in a SCOM environment for those of you who might not be familiar with SCOM is a packet of data sent from the agent to the management server on a regular basis, basic…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question