I think I recall that it used to be the Find button would put focus on the document I am searching for. That appears to no longer be the case (insert sad face here). So here I am slaving away on a weekend for my wonderful client having assured them that I can write a macro to mass apply documents which have already been posted. I did it in the past (for PM documents), but focus will not go to the searched RM document in Dynamics GP 2010.
Help!
Here is the code. It works with Fabrikam from the Sales home page starting with the Apply window closed. I know that the problem is the hardcoded "# Key 1" and "line 1", but how can I get around having to use that?
# DEXVERSION=11.00.0221.000 2 2
ClickHitIE , 'http://dexterity/product=0/script=ExecuteAreaPageLink/args=0,1567,26/' # http://dexterity will be pre-pended
NewActiveWin dictionary 'default' form 'RM_Cash_Apply' window 'RM_Apply_Document'
MoveTo field 'Customer Number'
TypeTo field 'Customer Number' , 'AARONFIT0001'
MoveTo field 'Document Type' item 3 # 'Payments'
ClickHit field 'Document Type' item 3 # 'Payments'
MoveTo field 'Document Number'
TypeTo field 'Document Number' , 'PYMNT000000000067'
MoveTo field Date
TypeTo field Date , '041317'
MoveTo field 'Posted Date'
TypeTo field 'Posted Date' , '041217'
TransLinePrepare scrollwin 'RM_Applied_Document_Scroll'
# Key 1:
MoveTo line 1 scrollwin 'RM_Applied_Document_Scroll' field '(L) Apply Select' # 'FALSE'
MoveTo field 'Find Button'
ClickHit field 'Find Button'
NewActiveWin dictionary 'default' form 'RM_Cash_Apply' window 'RM_Cash_Apply_Find'
ClickHit field 'Document Type' item 1 # 'Sales / Invoices'
MoveTo field 'Document Number'
TypeTo field 'Document Number' , 'DM20005'
MoveTo field 'Find Button NONE'
ClickHit field 'Find Button NONE'
NewActiveWin dictionary 'default' form 'RM_Cash_Apply' window 'RM_Apply_Document'
# Key 1:
MoveTo line 1 scrollwin 'RM_Applied_Document_Scroll' field '(L) Apply Select' # 'FALSE'
# Key 1: 'AARONFIT0001', '5', 'SVC1000', '0'
ClickHit line 1 scrollwin 'RM_Applied_Document_Scroll' field '(L) Apply Select' # 'TRUE'
# Key 1: 'AARONFIT0001', '5', 'SVC1000', '0'
MoveTo line 1 scrollwin 'RM_Applied_Document_Scroll' field DebitApplyAmt
# Key 1: 'AARONFIT0001', '5', 'SVC1000', '0'
TypeTo line 1 scrollwin 'RM_Applied_Document_Scroll' field DebitApplyAmt , '200'
MoveTo field 'OK Button'
ClickHit field 'OK Button'
NewActiveWin dictionary 'default' form sheLL window sheLL
*This post is locked for comments