Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

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

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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
    Community Member Microsoft Employee on at
    RE: GP 2016 VStools addin integration with web client - Dynamics.Globals.SqlPassword getting wrong password

    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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans