Tuesday, July 15, 2014

Oldie But Goody- Users When Logging in to Test Companies

This is a pretty common issue, but I thought it was worthwhile to post a summary of the issue and the (relatively) easy fix.

First, the scenario...
  1. You set up users in GP (Admin Page-Setup-User)
  2. You don't want users accidentally testing in the live company, so you limit their access to the Test company only (Admin Page-Setup-User Access)
  3. This works great until you refresh the Test database with a copy of the Live database
  4. Now the users can't access the Test company, and receive a variety of errors on the SY_Current_Activity table
This is due to the fact that the users have access to the test DB per the GP setup, but the database itself does not have the users attached to it (once restored from Live).  If you attempt to remedy this in GP through Admin Page-Setup-User Access, you will usually also receive errors if you attempt to unmark/remark access to the Test company.

So, it's a relatively easy three part fix...(as always test this out, have a backup, yadda yadda yadda)
  1. In SQL Server Management Studio, first expand the Test company database, then expand Security, then expand Logins.  Make sure the user in question is NOT listed. If they are, delete the user.
  2. Next in SQL Server Management Studio, expand the overall Security folder, and expand Logins.  Right-click on the affected user and choose Properties.  Then click on the User Mapping page.  Unmark the access to the Test database in the upper part of the User Mapping window.
  3. Log in to GP, and navigate to Admin Page-Setup-User Access.  Select the affected user, and remark the access to the Test company
Now, to avoid this in the first place...
  1. Give users access to both the live and test versions of companies (not just the test versions), Admin Page-Setup-User Access. 
  2. Control their ability to enter in to the Live company by not giving them a security role, Admin Page-Setup-User Security.
Christina Phillips is a Microsoft Certified Trainer and Dynamics GP Certified Professional. She is a senior managing consultant with BKD Technologies, providing training, support, and project management services to new and existing Microsoft Dynamics customers. This blog represents her views only, not those of her employer.

No comments: