web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics GP (Archived)

GP 2016 VStools addin integration with web client - Dynamics.Globals.SqlPassword getting wrong password

(0) ShareShare
ReportReport
Posted on by

I am working on a customization for a client in GP 2016 -  They are using the desktop client as well as the web client.  

in my C# code I am using Dynamics.Globals.SqlPassword and Dynamics.Globals.UserId to make a connection to the database.  

It works fine on the desktop client and I'm able to connect to the database - but when using the web client it seems to be grabbing a different password and therefore failing to connect.  

I assumed it was getting the password of the user setup to connect the web client to the database (gpwebclient) but I tried hardcoding that username and it's still failing.  

Any ideas here?  Having trouble finding supporting documentation for this area. 

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    on at

    so looks like I was backwards.. it was getting the right password, wrong user... for the webclient I had to use the sqlLoginID instead of the UserId

    // if it's the desktop client we will use the gpusername/password to authenicate ...

                   if (Dynamics.Forms.SyVisualStudioHelper.Functions.DexRuntimeGetClientType.Invoke() == 1)

                   {

                       Username =  Dynamics.Globals.UserId.Value;

                   }// if it's the web client we'll use the sqllogin/password

                   else if (Dynamics.Forms.SyVisualStudioHelper.Functions.DexRuntimeGetClientType.Invoke() == 2)

                   {

                       Username = Dynamics.Globals.SqlLoginId.Value;

                   }

    all is good in the world now

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Leaderboard > 🔒一 Microsoft Dynamics GP (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans