I have created a macro that runs from within Great Plains Dynamics.
The macro enters a payables transaction.
My problem is this............the application has a field = Document Number. This field has to have a unique value.
I need to modify my macro so that this field gets populated with the system date. (they won't be running this macro more than once per day).
Here's the entire macro - I marked out where the document number field needs to become system date...........
# DEXVERSION=10.0.324.0 2 2
CheckActiveWin dictionary 'default' form 'PM_Transaction_Entry' window 'PM_Transaction_Entry'
MoveTo field 'Transaction Description'
TypeTo field 'Transaction Description' , 'testing macro'
MoveTo field 'Batch Number'
MoveTo field 'Document Date'
MoveTo field 'Vendor ID'
TypeTo field 'Vendor ID' , 'DYNAMICSSOUR'
MoveTo field 'Vendor Address Code - Primary'
MoveTo field 'Vendor Address Code - Remit To'
MoveTo field 'Payment Terms ID'
MoveTo field 'Document Number'
TypeTo field 'Document Number' , '1123'
-------Instead of '1123' I need to insert the system date where '1123' goes-----------------------------MoveTo field 'Purchase Order Number'
MoveTo field 'Shipping Method'
MoveTo field 'Tax Schedule ID'
MoveTo field 'Purchases Amount'
TypeTo field 'Purchases Amount' , '1111111'
MoveTo field 'Trade Discount Amount'
MoveTo field 'Distributions Button'
ClickHit field 'Distributions Button'
NewActiveWin dictionary 'default' form 'PM_Transaction_Entry_Distribution' window 'PM_Transaction_Entry_Distribution'
MoveTo field 'OK Button'
ClickHit field 'OK Button'
NewActiveWin dictionary 'default' form 'PM_Transaction_Entry' window 'PM_Transaction_Entry'
MenuSelect title Additional entry 'Sprint Bill Breakout'
ActivateWindow dictionary 'Extender' form 'PT_UD_Detail_Window_1' window 'User Defined Window'
# Key 1:
MoveTo line 1 scrollwin 'Scrolling_Window' field 'User Defined Currency'[1]
# Key 1: '', '', '0'
TypeTo line 1 scrollwin 'Scrolling_Window' field 'User Defined Currency'[1] , '15000'
# Key 1: '', '', '0'
MoveTo line 1 scrollwin 'Scrolling_Window' field 'User Defined List'[2] item 0
# Key 1: '', '', '0'
ClickHit line 1 scrollwin 'Scrolling_Window' field 'User Defined List'[2] item 1 # 'EMS Gillette NY'
# Key 1: '', '', '0'
MoveTo line 1 scrollwin 'Scrolling_Window' field '(L) User Defined Checkboxes'[3] # 'FALSE'
# Key 1: '', '', '0'
ClickHit line 1 scrollwin 'Scrolling_Window' field '(L) User Defined Checkboxes'[3] # 'TRUE'
TransLinePrepare scrollwin 'Scrolling_Window'
# Key 1:
MoveTo line 2 scrollwin 'Scrolling_Window' field 'User Defined Currency'[1]
# Key 1: '', '', '0'
TypeTo line 2 scrollwin 'Scrolling_Window' field 'User Defined Currency'[1] , '12500'
# Key 1: '', '', '0'
MoveTo line 2 scrollwin 'Scrolling_Window' field 'User Defined List'[2] item 0
# Key 1: '', '', '0'
ClickHit line 2 scrollwin 'Scrolling_Window' field 'User Defined List'[2] item 2 # 'Noramco 2729 13th Av Hibbing MN'
# Key 1: '', '', '0'
MoveTo line 2 scrollwin 'Scrolling_Window' field '(L) User Defined Checkboxes'[3] # 'FALSE'
# Key 1: '', '', '0'
ClickHit line 2 scrollwin 'Scrolling_Window' field '(L) User Defined Checkboxes'[3] # 'TRUE'
MoveTo field 'OK Button'
ClickHit field 'OK Button'
NewActiveWin dictionary 'default' form 'PM_Transaction_Entry' window 'PM_Transaction_Entry'
Any assistance would be appreciated.
Bookmarks