Site Search:
Sign in | Join | Help

UserInfoGet

Last post 09-23-2008 8:59 AM by Steve Gray. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 01-09-2008 2:29 PM

    UserInfoGet

    Anybody knows how do i use UserInfoget?  Do I have to install anything extra? where is that assembly?

     

    Filed under:
    • 201.234.203.139
  • 01-09-2008 4:28 PM In reply to

    Re: UserInfoGet

    I've never heard of that. What info are you looking for?

     here's a post on how to get user data

    http://forum.4penny.net/forums/p/280/583.aspx#583

    HTH

     

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 216.77.101.2
  • 01-09-2008 4:47 PM In reply to

    Re: UserInfoGet

    UserInfoGet is an object that replaces retrieveglobals.dll in GP10. Like the following page says. http://www.microsoftdynamicsforums.com/forums/forum_posts.asp?TID=1499

     I realize that this object is only accesible from VBA, but I am developing a winfows form application. I am not using VS tools.

    I was migrating a windows form application that used retrieveGlobals9 to get the credentials of the current connected GP user.

    I think I am going to have to create a form requesting the username and password . :-(
     

    • 201.234.203.139
  • 09-23-2008 8:59 AM In reply to

    Re: UserInfoGet

    In Microsoft Dynamics GP 10.0, new connection objects were added to the VBA code. These new connection objects replace the RetrieveGlobals.dll and RetrieveGlobals9.dll files in Microsoft Dynamics GP. This new VBA code lets you create an active connection based off the username and password of the user who is currently logged into Microsoft Dynamics GP. This new connection object is named UserInfoGet. This UserInfoGet connection object enables you to use the following properties and methods:

    • The CompanyName property
    • The CreateADOConnection method  
    • The IntercompanyID property  
    • The UserDate property  
    • The UserID property  
    • The UserName property

    The following is a sample of code of the new UserInfoGet connection object. 

     Dim cn As New ADODB.connection
    Dim rst As New ADODB.recordset
    Dim cmd As New ADODB.Command
    
    
    Private Sub PushButtonM79_AfterUserChanged()
        cmd.CommandText = "Select * from RM00101"
        Set rst = cmd.Execute
        MsgBox (rst!custnmbr)
    End Sub
    
    
    Private Sub Window_AfterOpen()
        Set cn = UserInfoGet.CreateADOConnection
        cn.DefaultDatabase = UserInfoGet.IntercompanyID
        cmd.ActiveConnection = cn
    End Sub
    
    
     
    
    
    cmd.Parameters.Append cmd.CreateParameter("@vchrItemNumber", adVarChar, adParamInput, 31, [ItemNumber])
    cmd.Parameters.Append cmd.CreateParameter("@vchrSiteID", adVarChar, adParamInput, 11, [SiteID])

    Steve Gray, MCDBA
    Technical Editor
    steve@VSToolsForum.com
    • 71.100.135.32
Page 1 of 1 (4 items)