+ Reply to Thread
Results 1 to 2 of 2

Insert today's date

  1. #1
    Registered User
    Join Date
    08-23-2007
    Posts
    27

    Insert today's date

    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.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Insert today's date

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1