web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

Check Links and Reconcile MACROS

(0) ShareShare
ReportReport
Posted on by 766

I am trying to create Two macros in GP, that will allow me to select and walk away.

1.  Check Links for Sales, Purchasing and then Financial.

2. Reconcile Current Customer Info and then Outstanding Doc Amts.  for Sales, Purchasing and then Financial.

I think the macro kills at the point of opening the window backup to go to the next item.  When I run it, the Sales Check Links file saves to my designated path, and then I get an error "Window no longer available. (Line#21)".

Do I have to create a macro for every module for each run, within each company?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Check Links and Reconcile MACROS

    Hello again Napolo

    As for the first one, while recording the macro, are you printing reports to the screen ? If so, then that's definitely the cause of the problem since macro recording is stopped when a report is generated on the screen, and therefore the macro will not see the original check links form and would result with the usual error "Window no longer available", because the report is what's showing on top of your screen.

    Therefore, when recording your macro. Make sure not to print to the screen while running the check links, rather print into file with a predefined path.

    As for the reconcile customer information, the same logic applies as you are not supposed to print to the screen which will cause your macro to be interrupted and broken as well.

    Your feedback is highly appreciated,

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Check Links and Reconcile MACROS

    Another thing to be consider is to automate the whole process to run at night for instance, you can extend your macro to open Dynamics GP, login then run check links sequentially.  That can be included in a bat file which can be scheduled on the windows level to run at specific time on a daily bases.

    Let us know if you have any further inquiries,

  • Napolo Profile Picture
    766 on at
    RE: Check Links and Reconcile MACROS

    Hi Mahmoud!

    I am actually saving it to a file and it is still doing it.

    Love the idea of running this in the evening without doing anything :)  Do you have a link with instructions for dummies?? :)

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Check Links and Reconcile MACROS

    Would you share you macro code please ?

  • Napolo Profile Picture
    766 on at
    RE: Check Links and Reconcile MACROS

    # DEXVERSION=12.00.0276.000 2 2

    CheckActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'

     ClickHit field 'File Series' item 2  # 'Sales'

     MoveTo field 'Insert All Button'

     ClickHit field 'Insert All Button'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'

     MoveTo field 'Print to Screen'  # 'TRUE'

     ClickHit field 'Print to Screen'  # 'FALSE'

     MoveTo field 'Print to File'  # 'FALSE'

     ClickHit field 'Print to File'  # 'TRUE'

     MoveTo field 'Path Button'[1]

     ClickHit field 'Path Button'[1]

     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLins_Sales.csv' type 7

     MoveTo field 'If File Existing' item 0  # 'Append'

     ClickHit field 'If File Existing' item 1  # 'Replace'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    # Print To File:  'File Maintenance Error Report'

     CommandExec dictionary 'default'  form 'Command_System' command 'SY_Check_Links'

    NewActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'

     ClickHit field 'File Series' item 3  # 'Purchasing'

     MoveTo field Source item 0

     ClickHit field Source item 5  # 'Payables Setup Logical File'

     MoveTo field 'Insert All Button'

     ClickHit field 'Insert All Button'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'

     MoveTo field 'Print to Screen'  # 'TRUE'

     ClickHit field 'Print to Screen'  # 'FALSE'

     MoveTo field 'Print to File'  # 'FALSE'

     ClickHit field 'Print to File'  # 'TRUE'

     MoveTo field 'Path Button'[1]

     ClickHit field 'Path Button'[1]

     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLinks_Purchasing.csv' type 7

     MoveTo field 'If File Existing' item 0  # 'Append'

     ClickHit field 'If File Existing' item 1  # 'Replace'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    # Print To File:  'File Maintenance Error Report'

     CommandExec dictionary 'default'  form 'Command_System' command 'SY_Check_Links'

    NewActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'

     MoveTo field Source item 0

     ClickHit field Source item 5  # 'Account Transaction History'

     MoveTo field 'Insert All Button'

     ClickHit field 'Insert All Button'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'

     MoveTo field 'Print to Screen'  # 'TRUE'

     ClickHit field 'Print to Screen'  # 'FALSE'

     MoveTo field 'Print to File'  # 'FALSE'

     ClickHit field 'Print to File'  # 'TRUE'

     MoveTo field 'Path Button'[1]

     ClickHit field 'Path Button'[1]

     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLinks_Financial.csv' type 7

     MoveTo field 'If File Existing' item 0  # 'Append'

     ClickHit field 'If File Existing' item 1  # 'Replace'

     MoveTo field 'OK Button'

     ClickHit field 'OK Button'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    NewActiveWin dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    ActivateWindow dictionary 'default'  form 'Progress_Control' window 'Progress_Window'

    NewActiveWin dictionary 'default'  form sheLL window sheLL

    # Print To File:  'File Maintenance Error Report'

  • Suggested answer
    Redbeard Profile Picture
    12,931 on at
    RE: Check Links and Reconcile MACROS

    Napolo,

    Here is a blog post on automating the integration process. I have set this up for a client, who had a ridiculous number of transactions, which could only be done after hours, and they had a dude staying up to trigger/monitor the process. The guy tried to kiss me... it was awkward.

    dynamicserppros.com/using-autodim-exe-with-integration-manager-to-run-integrations-across-multiple-companies-in-microsoft-dynamics-gp

  • Suggested answer
    Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Check Links and Reconcile MACROS

    I have amended your code as below, please check it out and provide your feedback accordingly

    # DEXVERSION=12.00.0276.000 2 2
    
    CheckActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'
    
     ClickHit field 'File Series' item 2 
    
     MoveTo field 'Insert All Button'
    
     ClickHit field 'Insert All Button'
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'
    
     MoveTo field 'Print to File'  
    
     ClickHit field 'Print to File'  
    
     MoveTo field 'Path Button'[1]
    
     ClickHit field 'Path Button'[1]
    
     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLins_Sales.csv' type 7
    
     MoveTo field 'If File Existing' item 0  
    
     ClickHit field 'If File Existing' item 1  
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    
     CommandExec dictionary 'default'  form 'Command_System' command 'SY_Check_Links'
    
    NewActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'
    
     ClickHit field 'File Series' item 3  
    
     MoveTo field 'Insert All Button'
    
     ClickHit field 'Insert All Button'
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'
    
     MoveTo field 'Print to File'  
    
     ClickHit field 'Print to File'  
    
     MoveTo field 'Path Button'[1]
    
     ClickHit field 'Path Button'[1]
    
     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLinks_Purchasing.csv' type 7
    
     MoveTo field 'If File Existing' item 0  
    
     ClickHit field 'If File Existing' item 1  
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    
     CommandExec dictionary 'default'  form 'Command_System' command 'SY_Check_Links'
    
    NewActiveWin dictionary 'NBS Intercompany'  form 'SY_Check_Links' window 'Check Links'
    
     MoveTo field 'Insert All Button'
    
     ClickHit field 'Insert All Button'
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    NewActiveWin dictionary 'default'  form 'Report_Destination' window 'Report_Destination'
    
     MoveTo field 'Print to File'  
    
     ClickHit field 'Print to File'  
    
     MoveTo field 'Path Button'[1]
    
     ClickHit field 'Path Button'[1]
    
     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLinks_Financial.csv' type 7
    
     MoveTo field 'If File Existing' item 0  
    
     ClickHit field 'If File Existing' item 1  
    
     MoveTo field 'OK Button'
    
     ClickHit field 'OK Button'
    
    


  • Napolo Profile Picture
    766 on at
    RE: Check Links and Reconcile MACROS

    Thank you both so much!!  This is really great.  I was placed into this position about a year ago.  Learning by trial/error.  Your support has given me new hope!  Harry Lee - i will be looking into this automated process in the near future - thank you.

    Mahmoud - Thank you so much for your assistance with this macro - This is great!  I can physically see it run all the way through for each module.  The only issue I see now, is that the files are not saving in the path.  No errors during the run, but not getting any output. I tried deleting the files that were saved at the selected path. I tried leaving the old files there, and deleted the content to see if it would append.  I tried running the macro on a few companies wondering if it only saves a file if it find something.  

    thank you again!

  • Mahmoud Saadi Profile Picture
    32,738 on at
    RE: Check Links and Reconcile MACROS

    Okay, Napolo

    Locate these two lines of code

     ClickHit field 'Path Button'[1]
     
     FileSaveAs file '../../Users/Napolo/Desktop/GP MACROS/MTD Macro Save Path/CheckLinks_Financial.csv' type 7
    
    

    Replace the path as shown below:

     ClickHit field 'Path Button'[1]
     
     FileSaveAs file 'D:\CheckLinks_Financial.csv' type 7
    
    
    


  • Napolo Profile Picture
    766 on at
    RE: Check Links and Reconcile MACROS

    :( I have tried, D:\, C:\ and my shared drive N:\.

    ClickHit field 'Path Button'[1]

    FileSaveAs file 'N:\CheckLinks_Financial.csv' type 7

    It still runs right through, but no file populates.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans