Page 1 of 2212345678910...20...Last »

"A SQL Server login already exists for . Delete the user and create a new user" error when switching a user ID from web client only to mixed…

I’m completing the deployment of Microsoft Dynamics GP 2013 R2’s Project Accounting and Time Entry approval workflow for a customer in Alabama who is currently deploying web client for extranet access (and timesheet entry) and desktop client for intranet access.

As a result, since time entry employees are remote, we decided to setup these user accounts as web client only. However, the customer wanted to provide an alternative to the web client in case it became unavailable. This meant that these users would needed the ability to access the Microsoft Dynamics GP desktop client via a Terminal Server provisioned (albeit temporarily) to support this goal.

The Problem

To meet this requirement, we needed to adjust the user accounts in Dynamics GP to also support SQL Server authentication (in addition to web client access), by deselecting the Web Client user only check mark and completing the SQL Login credentials information. Upon attempting to save the changes we received the following error:

A SQL Server login already exists for userID. Delete the user and create a new user.

As it so turns out with most application errors, you cannot just follow the instructions literally to fix the problem. In this case, we had more than 85 web client only user accounts created so “Delete the user and create a new user” wasn’t an option and I don’t know why I had a gut instinct this recommendation would not work anyways.

It also turns out that I tested this in Microsoft Dynamics GP 2015 and had no issues switching a user account from Web Client user only to a mixed mode access user account.

NOTE: “mixed mode access” user is a terminology I came up with to identify a Microsoft Dynamics GP user account with access capabilities from both the web client and desktop client.

The Solution

In troubleshooting this problem, the first thing is to focus on the first part of the error message, “A SQL Server login already exists”. If a login already exists on SQL Server, then it should be visible under Management Studio – bear in mind that each Dynamics GP user account was setup as a web client only account to begin with. In principle, there should be no SQL Server security principal for these type of accounts.

Management Studio did not show any account created for the Dynamics GP under the Security folder. So the next logical thing would be to run a statement to check for a SID for the account in question:

SELECT suser_sid(‘TheUserID’);

This statement returned an actual SID number (a long hexadecimal set of characters), confirming at least there was a corresponding SID for the account, even though we could not see the actual account in Management Studio.

Next was to verify then, what account was assigned to that SID. In order to do this, I ran the following SQL statement:

SELECT name FROM sys.server_principals where sid = (SELECT suser_sid(‘TheUserID’));

As it turned out, this statement returned no results. So here’s the conundrum… GP thinks there’s a SQL login for a user account that doesn’t really exists on SQL, but has a SID.

Now, because there wasn’t an actual SQL login for the user ID in question, I went ahead and setup a new SQL login with the user account by running the following statement:

sp_addlogin(‘TheUserID’, ‘somePassword’);

The statement was successful and I could now see the SQL login under the security folder.

The next thing was to then reset the Dynamics GP web client user flag and assign the SQL login to the user account:

UPDATE SY01400 SET WCUser = 0,  SQLLoginID = ‘TheUserID’ WHERE USERID = ‘TheUserID';

Since Microsoft Dynamics GP passwords are encrypted on SQL Server, you will now need to log into Dynamics GP, pull up the user account under the User Maintenance window, and change the password in the SQL login credentials section.


I cannot assess whether this is a bug or not, but suffice to say the same behavior is not present in GP 2015, so I must lean towards it being a bug.

I hope you find these troubleshooting steps useful.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Continued here:
"A SQL Server login already exists for . Delete the user and create a new user" error when switching a user ID from web client only to mixed…

May 29, 2015 · Mariano Gomez · No Comments
Tags: , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 298

Microsoft Convergence Atlanta 2015 (#CONV15) – Day 3

Ok, I’m officially tired! Day 2 did not leave much room to sleep with a presentation, expo, dinner, and Rock-n-Rave (even though I did not stay long).

However, today I had to gut it out for our repeat session, CS15G024-R2 Microsoft Dynamics GP 2015: Customizing the user interface, which was scheduled for 11:00 AM.

CS15G024-R2 Microsoft Dynamics GP 2015: Customizing the user interface
Mariano Gomez and David Musgrave

We had 64 people in our session and really had an enthusiastic crowd despite the Rock-n-Rave precedent. The session went on as planned and we feel we had a bit more organization in our delivery.

Once our session finished, I ran off to Kevin and Dan’s session, CS15G014 – Leveraging Microsoft Dynamics GP 2015: Service Based Architecture for better integrations.

Kevin Racer and Dan Lothspeich

This session was truly informative as Kevin and Dan walked through the evolution of the work environment and how it has been impacted by the ever increasing hours we spend working, the ever decreasing workforce age, our own understanding of the Internet, the increasing workload many of us are challenged with, and the endless ways to communicate. This all has led companies to seek increased computing resources to process massive amounts of data which cloud computing seems to deliver well via a service oriented architecture model. This service model has driven the appification of software functionality, a technique by which software functions are exposed as services to be consumed by other software applications.

This brings us to the Microsoft Dynamics GP Service Based Architecture model, which seeks to expose parts of Dynamics GP as services to be consumed by other applications, also allowing Dynamics GP to consume services.

Microsoft Dynamics GP Service Based Architecture

The key to this technology evolution has been the enhanced interoperability with Microsoft .NET built within the Microsoft Dexterity toolset and leveraged via the Dynamics GP application. Kevin then went on to conduct a short demo on the endpoint URI structure and patterns to access the Dynamics GP services and showed off some of the cool discovery tools available, while detailing the security flow and authentication mechanisms required to access the Dynamics GP services.

Then we had eOne demoing their latest product, Service Builder which allows users and developers to expose any part of GP as a service, similar to how SmartList Builder exposes GP data. In fact, the idea is to also allow users to expose smart lists as services. Other applications include being able to expose Microsoft Dynamics GP windows and the underlying Dexterity scripts as services, conceivably allowing any function within GP to be consumed by other applications.

Well, I could go on and on, but hopefully you get the point. Kevin and Dan’s session is available on the Virtual Convergence site, here.


I returned to the Expo to try and catch up with David who had attended another session, but decided to go visit some folks I hadn’t seen yet. After saying hi and catching up with David, we returned to the Omni Hotel in preparation for the OneRepublic concert and to decompress from the day. I had invited a good friend of mine and I left to pick her up and return to the Phillips Arena.

The OneRepublic concert motto: “One Believable Convergence Celebration”

Once inside the arena, we quickly head to the floor area to get a good view of the group for the opening. In the meantime, we were enjoying some of the cool music being played. The group came on stage with their song Light it Up to open the concert.

The concert got progressively better with the group artists hitting some solos.

Well, the night was really a good one, but it was time to wrap up and get home.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Read more here:
Microsoft Convergence Atlanta 2015 (#CONV15) – Day 3

April 2, 2015 · Mariano Gomez · No Comments
Tags: , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 78

Microsoft Dynamics GP 2015 Identity Management

Hi everyone! It’s been hectic around here with a few projects going live in these days, in addition to preparations for Convergence 2015 here in Atlanta.

I wanted to draw your attention to two videos currently posted on the Microsoft Dynamics YouTube channel, related to the Identity Management feature.

Identity Management was introduced with Microsoft Dynamics GP 2013 R2, so is probably good to go back and review the original feature design goal with Tara Higgins with the Partner Technical Consulting team.

With Dynamics GP 2015, the feature was extended to cover authentication with organizational accounts, which provides single sign-on capabilities for Microsoft Azure AD accounts. Identity Management for organizational accounts is a web client feature only. Take a look at this video by my buddy Jason Lech with the Escalation Engineering team.

My goal is to release a video showing a real life example on how to set this up. So stay tuned.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Originally posted here:
Microsoft Dynamics GP 2015 Identity Management

February 12, 2015 · Mariano Gomez · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 139

Welcome to the Microsoft Dynamics GP Engineering Team blog

Now, here’s something you don’t see every day: in the trench software development and testing engineers having time to write anything other than code. Well, the Microsoft Dynamics GP Engineering Team (consisting of the Development Engineering and Testing teams) have decided to break their ‘silence’ (so to speak) to pick up their digital pens and deliver some awesome content.

From this group you can expect content around the inner works of Service Based Architecture, Workflow and myriads of other engineering topics.

If you are an avid Microsoft Dynamics GP development engineer, a Microsoft Dynamics GP ISV, a technical consultant looking to propel your knowledge to new heights, then this new resource is for you! Expect coverage from folks like Alice Newsam, Rob Anderson, Michael Hammond, Chris Rudolph, Yuri Mikeev and others.

Below please find the link to the Dynamics GP Engineering Team Blog:

Dynamics GP Engineering Team Blog

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Disclaimer: the above banner is not an official Microsoft or Microsoft Dynamics GP Engineering Team logo and was created solely for the purpose of bringing attention to the team’s new Community site.

View post:
Welcome to the Microsoft Dynamics GP Engineering Team blog

January 20, 2015 · Mariano Gomez · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 90

Microsoft Dynamics GP backups with Windows Azure Blob Storage Service – Follow up

As a follow up to my post yesterday (see Microsoft Dynamics GP backups with Windows Azure Blob Storage Service), an issue has been identified with Microsoft Dynamics GP 2015 running on SQL Server 2014 when choosing Microsoft Azure storage as the destination for the backup.

You will receive the following warning message:

The SQL Server version that you are using does not support backing up or restoring your database from Microsoft Azure storage.

I have traced the issue back to the logic in the ‘(L) RGRestoreBackupOption’ of window BackupRestore of form syBackupRestore field change script, which seems to compare the build number even after it has determined the version number is greater than SQL Server 2012 SP1 CU2 (11.0.3339). Of course, the build number for SQL Server 2014 CU4 is 12.0.2430. Since 2430 is not greater than 3339, the script sets the validation flag to false, causing the script to abort with the message indicated above.

This problem is exclusive to Microsoft Dynamics GP 2015 RTM (14.00.0524) running on SQL Server 2014, and cannot be replicated if you are running Microsoft Dynamics GP 2013 R2 or Microsoft Dynamics GP 2015 on SQL Server 2012 SP1 CU2 or greater. Microsoft is currently aware of this situation (at least via the Dynamics GP Online Partner Technical Community Forum), but if you are

For more information on SQL Server 2014 build numbers, see Microsoft Support kb article 2936603, SQL Server 2014 build versions.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

View article:
Microsoft Dynamics GP backups with Windows Azure Blob Storage Service – Follow up

December 15, 2014 · Mariano Gomez · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 119

Microsoft Dynamics GP 2015 RTM is now available

This week saw the release of Microsoft Dynamics GP 2015, six months after the release of Microsoft Dynamics GP 2013 R2. Dynamics GP 2015 introduces over 120 new features, all of which have been covered recently over at Inside Microsoft Dynamics GP, the official blog of the Microsoft Dynamics GP Product Management & Marketing teams.

This new release also introduces a first round of Service Based Architecture operations, geared toward enhancing the product integration capabilities, and the ability for developers to expand into areas such as mobile applications, cross-platform applications, cloud-based applications and services, among others.

At its core, developers will now enjoy the enhanced coding capabilities with the introduction of .NET interop in Microsoft Dexterity, the IDE used to build Dynamics GP.

For the IT director or manager, Microsoft Dynamics GP 2015 introduces single sign-on capabilities offered via Windows Azure Active Directory, yet reinforcing Microsoft’s commitment to the cloud.

PartnerSource

CustomerSource

Here are links for the articles about the release:

Inside Microsoft Dynamics GP

Dynamics GP Support and Services Blog

Winthrop Development Consultants (David Musgrave)


ERP Software Blog

Microsoft Dynamics GP Administrator

Dynamics GP Essentials

Dynamics GP – Learn & Discuss

Azurecurve


For questions about upgrading to Microsoft Dynamics GP 2015, please contact me for a free consultation or use the comment section provided with this article.

Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Read the original post:
Microsoft Dynamics GP 2015 RTM is now available

December 5, 2014 · Mariano Gomez · No Comments
Tags: , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 188

Microsoft Dynamics GP 2015 Developer’s Preview: .NET Framework Interoperability – Part 3

In part 2 of the series, I delivered a brief primer on the service architecture in Microsoft Dynamics GP 2015 and how you are able to consume services natively created with Dexterity. There are two types of services that can be created: services that wrap existing windows and forms functionality, i.e., creating a customer; and services that can wrap around existing sanScript procedures, i.e, retrieving customer information. The truth is, none of that stuff would be possible without the ability to interoperate with the Microsoft .NET Framework.

Today, I’m going to show you some of the .NET interop capabilities built into Dexterity 14.0 and how these can enhance the user experience and your application integration capabilities. The example used in this post is based on my previous article, Building a COM Interop Assembly to use with Microsoft Dexterity, which showed how we had to leverage .NET’s ability to expose an assembly via COM interfaces, so we could reference its methods using Dexterity. In that particular example, I built some standard methods to expose the sine, cosine, and tangent trigonometric functions to a Dexterity application. This time around, I will show how to build the same functionality taking full advantage of Dexterity’s new .NET interop capabilities.

The user experience will be slightly different this time. In addition to a window that will allow you to calculate any of the trigonometric functions on a specific angle (entered in degrees), we will display a .NET form showing a visual representation of that angle. The .NET form will be dynamically built and displayed from Dexterity using the methods and properties provided by the Form class (System.Windows.Forms) and the visual drawings will be delivered using the classes exposed in the System.Drawing namespace.

1. The first things we must do is incorporate references to the corresponding assemblies for the Forms class and Drawing namespaces. As developer, the first thing you will notice is the enhancements to Dexterity’s Library Definition window, which now allows for the selection of a .NET Assembly library type.

Library Definition

Once the type has been selected, you can browse out to the different .NET assemblies loaded on your operating system.

.NET Assemblies

In particular, what I like is the ability to select the .NET Framework assembly that I want to work with directly, as opposed to having to compile my application for a specific Framework version as you normally would do with Visual Studio.

Resource Explorer will now reflect the different .NET namespaces selected for you application.

Resource Explorer

2. Since this article assumes some familiarity with Dexterity, I’m not going to dive into the process of building the form and window, but rather point out that it follows the same layout and properties I used in my previous article.

Form and Window Definition

The only “rarity” here is I added a local field called ‘(L) GraphicAngleForm’ that will serve as a generic reference to the .NET form we will dynamically create. The ‘(L) Conversion’ and ‘(L) Angle’ fields are currency fields and are formatted with two decimals and unsigned (DLR11_U2).

Generic Reference field

3. The code for our ‘(L) Sine’ button will look something like this.

MGB_Trigonometric_Test l_Sine_CHG

// Created by Mariano Gomez, MVP
// This code is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 3.5 Generic license.
using System;
using System.Windows.Forms;
using System.Drawing;

local currency l_angle;
local Form f;

'(L) Prompt' = "The Sin(%1°) value is ";
substitute '(L) Prompt', str('(L) Angle');

// calculate the sine value of the angle after converting it to radians
'(L) Conversion' = Math.Sin(Math.PI * '(L) Angle' / 180.0);

if empty('(L) GraphicAngleForm') then
f = new Form();
'(L) GraphicAngleForm' = f;

f.Text = "Graphical Representation of the Angle entered";
f.BackColor = Color.White;

// Set the size of the form
f.ClientSize = new Size(640, 480);

// Make the form a fixed size
f.MaximumSize = f.ClientSize;
f.MinimumSize = f.ClientSize;

// event handlers
f.Paint += PaintAngle of form MGB_Trigonometric_Test;
f.FormClosed += CloseDrawingForm of form MGB_Trigonometric_Test;

end if;

// show and activate our .NET form
'(L) GraphicAngleForm'.Show();
'(L) GraphicAngleForm'.Activate();

When you really look at the code, the first thing you will notice is the first 3 lines. sanScript now implements the using statement just like C#. sanScript has also been extended to use the implement statement for dynamically referencing an assembly.

using System;
using System.Windows.Forms;
using System.Drawing;

Next we can then calculate the sine of the angle in radians by simply calling the Math.Sin() method in the System namespace (the System namespace is part of the Microsoft Core Library, mscorlib.dll). We also reference the Math.PI constant to perform the conversion of the angle from degrees to radians.

// calculate the sine value of the angle after converting it to radians
‘(L) Conversion’ = Math.Sin(Math.PI * ‘(L) Angle’ / 180.0);

Once we have the angle converted and displayed in the ‘(L) Conversion’ field, we can proceed to create the form by instantiating the Form class – in reality, this part is no different than what you would normally do for COM classes – and setting some properties for the .NET form we want to display. Once we have set the size of the window, we need to create some event handlers for when the .NET form open and closes. As you can see in the code, Dexterity now implements event handlers through the use of the += operator.

// event handlers
f.Paint += PaintAngle of form MGB_Trigonometric_Test;
f.FormClosed += CloseDrawingForm of form MGB_Trigonometric_Test;

Our event handlers in this case will be the PaintAngle (on .NET form open) and CloseDrawingForm (on .NET form close). The PaintAngle event handler will display the actual graphical representation of the angle, and the CloseDrawingForm event handler will do some cleanup for us. Now, as you may suspect, these event handlers are implemented as procedure scripts to the MGB_Trigonometric_Test form (form procedures). So let’s take a look at the PaintAngle form procedure:

PrintAngle

// Created by Mariano Gomez, MVP
// This code is licensed under the Creative Commons
// Attribution-NonCommercial-ShareAlike 3.5 Generic license.
using System;
using System.Windows.Forms;
using System.Drawing;

inout System.Object sender;
inout PaintEventArgs e;

local Pen bp, rp;
local Color c;

// Get the color
c = Color.Blue;

// Create the blue pen
bp = new Pen(c, 2);

e.Graphics.DrawLine(bp, 320, 240, 520, 240);
e.Graphics.DrawLine(bp, 320, 240, 320 + Math.Cos('(L) Conversion' of window MGB_Trigonometric_Test) * 200, 240
- Math.Sin('(L) Conversion' of window MGB_Trigonometric_Test) * 200);

c = Color.Red;
rp = new Pen(c, 2);

e.Graphics.DrawEllipse(rp, 300, 220, 40, 40);

Again, the mechanics here is not so much the important part, but rather to highlight the clever way in which the event handler parameters are declared for the sender of the event and the event arguments being passed by the sender of the event. For this the Dexterity team chose to implement inout parameters.

Overall the PrintAngle procedure simply draws two lines and a circle. The first line is the base line of the angle and will simply be a horizontal line. The second line actually shows the displacement in reference to the base line to give the actual angle representation. This all looks something like this when the code is executed:

Angle Calculator

Having the ability to leverage .NET capabilities directly from Dexterity has now opened up a new realm of possibilities for Microsoft Dynamics GP business application developers. Applications that were once thought to be out of reach or required complex workarounds are now a thing of the past. Code portability is now much more compact and robust than before. The good part is, Dexterity developers do not need relearn any development patterns and/or be exposed to steep learning curves. All the .NET Framework documentation is available online with tons of sample code to go along.


This article is part of the Microsoft Dynamics GP 2015 Developer’s Preview series.

Microsoft Dynamics GP 2015 Developer’s Preview: Loading the VHD image – Part 1
Microsoft Dynamics GP 2015 Developer’s Preview: Working with Sample URIs – Part 2
Until next post!

MG.-
Mariano Gomez, MVP
Intelligent Partnerships, LLC
http://www.intelligentpartnerships.com/

Continue reading here:
Microsoft Dynamics GP 2015 Developer’s Preview: .NET Framework Interoperability – Part 3

October 29, 2014 · Mariano Gomez · No Comments
Tags: , , , , , , , , , , ,  · Posted in: Blogs I Follow Total Views: 189