Error message when you attempt to open the Users page in Business Portal of Microsoft Dynamics GP: "An unexpected error has occurred. Please try closing the browser and starting again, or contact your support specialist"


Symptoms


When you try to open the Users page in Business Portal of Microsoft Dynamics GP, you receive the following error message:

""An unexpected error has occurred. Please try closing the browser and starting again, or contact your support specialist"

When you then click the Details button on the error message, you receive the additional text related to the error message:

"System.Exception: soap:Server Server was unable to process request. ---> Microsoft.Dynamics.Hrm.Entity.Employee"

Cause


In the MBFRoleUser table of the DYNAMICS database, you have an Employee ID assigned in theConstituent field that does not exist as an employee in the UPR00100 table of the company database. 

 

Resolution


Remove the orphaned Employee ID assignment record from the MBFRoleUser table of the DYNAMICS database. Follow these steps for finding and removing the orphaned Employee ID assignment record from the MBFRoleUser table of the DYNAMICS database.

1.  Start the SQL Server Management Studio. To do this, use one of the following methods depending on the program that you are using.

For SQL Server 2000

If you are using SQL Server 2000, start SQL Query Analyzer. To do this, clickStart, point to All Programs, point to Microsoft SQL Server, and then clickQuery Analyzer.

For SQL Server 2005

If you are using SQL Server 2005, start SQL Server Management Studio. To do this, clickStart , point to All Programs, point to Microsoft SQL Server 2005, and then clickSQL Server Management Studio.

For SQL Server 2008

If you are using SQL Server 2008, start SQL Server Management Studio. To do this, clickStart, point to All Programs, point to Microsoft SQL Server 2008, and then clickSQL Server Management Studio.

 

2.  Run the following statement against the DYNAMICS database to find all of the Employee ID assignment records in the MBFRoleUser table of the DYNAMICS database:

select * from MBFRoleUser where Constituent like '%Microsoft.Dynamics.Hrm.Entity.Employee ID%' order by Constituent

The EmployeeID= string within the Constituent column will show you the Employee ID's that are assigned to the Business Portal role.

3.  Run the following statement against the company database to find all of the Employee ID records that exist in your UPR00100 table:

select EMPLOYID from UPR00100 order by EMPLOYID

The results of this script will show you all of the Employee ID's that exist in the Employee Master table.

4.  Compare the Employee ID= assignment records in the Constituent column from the results of the script run from Step #1 with the employees returned from the results of the script run from Step #2. Find the Employee ID assignment records that exist in the Constituent column of the MBFRoleUser table of the DYNAMICS database that do not exist as an Employee ID in the UPR00100 table of the company database.

5.  Once you have identified the orphaned Employee ID assignment record from Step #3, run the following statement against the DYNAMICS database to remove this orphaned Employee ID assignment:

delete MBFRoleUser where Constituent = 'XXXX'

NOTE: Replace XXXX with the Constituent value of the orphaned Employee ID assignment record from the MBFRoleUser table.

 

EXAMPLE:  Here would be an example of the delete statement needed in Step #4:

delete MbfRoleUser where Constituent='<entityKey><Microsoft.Dynamics.Common.Company.Company ID="-1" /><Microsoft.Dynamics.Hrm.Entity.Employee ID="429732375" /></entityKey>'

In this example, Employee number 429732375 was the orphaned Employee ID assignment from Step #3.

 

More Information


The information in the MBFRole User table is inserted when you clickHome in Business Portal, click Site Actions, clickSite Settings, click Users, select a user from theUser List, click Roles, click Modify, and then assign a role in the Modify Portal and Advanced Roles -- Webpage Dialog window.  ClickOK.