Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

MACRO PROBLEM - POSTING PURCHASING BATCHES WITH PROGRESS WINDOW

Posted on by 150

I have a problem now with a macro that has more than one ClickHit field 'Post Button'. When the Progress window pops up, the POST PURCHASING BATCHES loses focus and the next post errors out with WINDOW NOT ACTIVE even though there is a ActivateWindow. If I change the macro from "POST' to 'SAVE" and no progress window appears, it works fine. Here's the macro in it's current form  -

#!LOGON AND LAUNCH GP

CheckActiveWin dictionary 'default' form Login window Login

MoveTo field '(L) SQL_DataSource' item 1 # 'Dynamics GP 2010'

ClickHit field '(L) SQL_DataSource' item 1 # 'Dynamics GP 2010'

MoveTo field 'User ID'

TypeTo field 'User ID' , '<USERID>'

MoveTo field Password

TypeTo field Password , '<PASSWORD>'

MoveTo field 'OK Button'

ClickHit field 'OK Button'

NewActiveWin dictionary 'default' form sheLL window sheLL

NewActiveWin dictionary 'default' form sheLL window sheLL

CommandExec dictionary 'default' form 'Command_Purchasing' command 'POP_Batch_Entry'

NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

#!BATCH POSTING

NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

ActivateWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

TypeTo field 'Batch Number' , 'FG-130130060004'

MoveTo field Origin item 0

ClickHit field Origin item 1 # 'Receivings Trx Entry'

MoveTo field 'Batch Comment'

MoveTo field 'Post Button'

ClickHit field 'Post Button'

#!BATCH POSTING

NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

ActivateWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

TypeTo field 'Batch Number' , 'FG-130130080007'

MoveTo field Origin item 0

ClickHit field Origin item 1 # 'Receivings Trx Entry'

MoveTo field 'Batch Comment'

MoveTo field 'Post Button'

ClickHit field 'Post Button'

#!CLOSE AND END

NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

CloseWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

NewActiveWin dictionary 'default' form sheLL window sheLL

CommandExec form BuiLtin command cmdQuitApplication

 

 

*This post is locked for comments

  • L Vail Profile Picture
    L Vail 65,271 on at
    Re: MACRO PROBLEM - POSTING PURCHASING BATCHES WITH PROGRESS WINDOW

    Hi Phillip,

    This surprises me, I can run it and it works just fine. I hate to see you have to launch separate jobs, but if it's working for you , that's all that counts.

    Kind regards,

    Leslie

  • Phillip Derryberry Profile Picture
    Phillip Derryberry 150 on at
    Re: MACRO PROBLEM - POSTING PURCHASING BATCHES WITH PROGRESS WINDOW

    Tried that beforehand and tried it as you entered and it still errors out. I figured a way around it by launching separate jobs which works fine.

  • L Vail Profile Picture
    L Vail 65,271 on at
    Re: MACRO PROBLEM - POSTING PURCHASING BATCHES WITH PROGRESS WINDOW

    Phillip,

    You need a line after the 'Post Button' to recognize the Progress Control window. Unfortunately, the macro system does not record this correctly.

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

    An edited version of the meat of your macro that will post both batches without error is below

    Kind regards,

    Leslie

     

    CommandExec dictionary 'default' form 'Command_Purchasing' command 'POP_Batch_Entry'

    NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

    #!BATCH POSTING

    NewActiveWin dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

    ActivateWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

    TypeTo field 'Batch Number' , 'FG-130130060004'

    MoveTo field Origin item 0

    ClickHit field Origin item 1 # 'Receivings Trx Entry'

    MoveTo field 'Batch Comment'

      MoveTo field 'Post Button' 

      ClickHit field 'Post Button' 

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

    NewActiveWin dictionary 'default'  form 'POP_Batch_Entry' window 'POP_Batch_Entry' 

    #!BATCH POSTING

    TypeTo field 'Batch Number' , 'FG-130130080007'

    MoveTo field Origin item 0

    ClickHit field Origin item 1 # 'Receivings Trx Entry'

    MoveTo field 'Batch Comment'

      MoveTo field 'Post Button' 

      ClickHit field 'Post Button' 

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

    NewActiveWin dictionary 'default'  form 'POP_Batch_Entry' window 'POP_Batch_Entry' 

    #!CLOSE AND END

    CloseWindow dictionary 'default' form 'POP_Batch_Entry' window 'POP_Batch_Entry'

    NewActiveWin dictionary 'default' form sheLL window sheLL

    CommandExec form BuiLtin command cmdQuitApplication


     

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans