Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

MACRO PROBLEM - POSTING PURCHASING BATCHES WITH PROGRESS WINDOW

(0) ShareShare
ReportReport
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
    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
    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
    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

#1
Almas Mahfooz Profile Picture

Almas Mahfooz 3 User Group Leader

Featured topics

Product updates

Dynamics 365 release plans