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
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,188 Super User 2024 Season 2
Martin Dráb 230,030 Most Valuable Professional
nmaenpaa 101,156