Automate Login To Microsoft Dynamics GP 10

Microsoft Dynamics GPClients who have upgraded to Microsoft Dynamics GP 2010 can use the new remember user and password functionality, but what about those who have not yet upgraded?

Well, in Microsoft Dynamics GP 10, and before, you can use a login macro to automate the login process. A macro can be created by pressing Alt + F8 on the login screen and following the normal login process before pressing Alt + F8 again to stop recording.

Alternatively you can save the code below, changing {username} and {password} to the required values. If you’re working in a Terminal Services, or Citri, environment the file can be saved to the users roaming profile so it is accessible from any client machine based on the users domain login.

In this example the following macro file, configured to log the user automatically into the Fabrikam, Inc. company, was saved to %userprofile%\AppData\Roaming\Microsoft\Microsoft Dynamics\GP;


# DEXVERSION=11.00.0349.000 2 2
Logging file 'LOGIN.LOG'
CheckActiveWin dictionary 'default' form Login window Login
MoveTo field 'User ID'
TypeTo field 'User ID' , '{username}'
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 'Switch Company' window 'Switch Company'
ClickHit field '(L) Company Names' item 1 # 'Fabrikam, Inc.'
MoveTo field 'OK Button'
ClickHit field 'OK Button'

After changing the {username} and {password} I amended the GP shortcut’s Target to “C:\Program Files\Microsoft Dynamics\GP2010\Dynamics.exe” Dynamics.set “%userprofile%\AppData\Roaming\Microsoft\Microsoft Dynamics\GP\login.mac” and could login without having to do more than double click the shortcut.

If you want the user to select a company when they login then sinply use the first part of the macro;


# DEXVERSION=11.00.0349.000 2 2
Logging file 'LOGIN.LOG'
CheckActiveWin dictionary 'default' form Login window Login
MoveTo field 'User ID'
TypeTo field 'User ID' , '{username}'
MoveTo field Password
TypeTo field Password , '{password}'
MoveTo field 'OK Button'
ClickHit field 'OK Button'

3 comments on “Automate Login To Microsoft Dynamics GP 10

  1. Not a good method as passwords are stored in clear text. Exposes the system and the accounting data if users happen to have elevated roles and privileges within Microsoft Dynamics GP.

  2. Hi Ian

    This method works, but does leave the password in plain text.

    I would recommend using the Omni Login feature of Omni Tools (now Dynamics Toolbox) which I developed and is now sold by Rockton Software.

    David
    http://blogs.msdn.com/DevelopingForDynamicsGP/

  3. Hi guys,

    To be entirely honest, I think any automatic login for a finance, or any other business, system is a bad idea; this includes Windows Authentication and the new Remember Username and Password functionality of Microsoft Dynamics GP 2010.

    However, we get occasional requests from clients about automatic login or Windows Authentication and in GP 10 there is no other native way of doing it. I do try to discourage them; both from a security perspective but also because any unexpected error message and the macro fails. The one client site who uses this method has the macro files stored in folders with the security permissions locked down so only the user in question has access to the files within.

    David, I’ll check out the Dynamics Toolbox; thanks for the tip.

    I know lots of people who never lock their PCs when leaving their desks, which is just as big a security problem when they’ve left GP open. I’ve mentioned this to a few clients and, while they agree locking the PC is a good idea from a security perspective, they never do.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy This Password *

* Type Or Paste Password Here *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>