Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Check Links and Reconcile MACROS

Posted on by 750

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

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

    Hi Mahmoud!

    Your macro code worked perfect. I will keep that close by and try to figure out why it wont save to my desktop.  When I record just the sales checklinks, it saves fine. I took the path from that macro and pasted in the one you provided and it still didn't save.    

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

    Napolo 

    Any updates on this thread ? Please let us know if this is resolved or if you still need any further assistance

    Your feedback is highly appreciated,

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

    Mmm, this is getting really interesting. Try this out, I have made some changes

    # 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/Export1.txt' type 5 
     
     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/Export2.txt' type 5  
     
     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/Export3.txt' type 5  
     
    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
    Napolo 750 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.

  • Mahmoud Saadi Profile Picture
    Mahmoud Saadi 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
    Napolo 750 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!

  • Suggested answer
    Mahmoud Saadi Profile Picture
    Mahmoud Saadi 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'
    
    


  • Suggested answer
    Redbeard Profile Picture
    Redbeard 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

  • Napolo Profile Picture
    Napolo 750 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'

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

    Would you share you macro code please ?

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans