Error message when you try to view the Document Approval Web page or the Invoice Approvals Web page in Business Portal for Microsoft Dynamics SL: "Server Error in '/' Application"


Symptoms


After installing Business Portal for Microsoft Dynamics SL or upgrading from a previous version of Business Portal for Microsoft Dynamics SL, when you try to view the Document Approvals Web page or the Invoice Approvals Web page on the "Time and Expense" center page in Business Portal for Microsoft Dynamics SL, you receive the following error message:
Server Error in '/' Application.

[Cause]Entity, Stored Procedure Result Set, is not found. [Correction]Supply the correct query parameters for the entity.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Microsoft.BusinessPortal.Pma.Diagnostics.PmaEntityNotFoundException:

[Cause]Entity, Stored Procedure Result Set, is not found. [Correction]Supply the correct query parameters for the entity.


Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Cause


This problem occurs if the MbfInstalledDatabases table was not updated correctly when the SQL Configuration screen created the SQL objects in the upgraded database.

Note The MbfInstalledDatabases table is a Microsoft Business Framework table. The SQL Configuration screen uses the MbfInstalledDatabases table to keep track of the activity on a database. Additionally, the SQL Configuration screen uses the table to determine how to correct any problems on a database.

Resolution


Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.

Warning The following steps should only be performed if you are experiancing the exact error message in the "Symptoms" section.

To resolve this problem, reinstall the SQL objects by using the SQL Configuration screen. To do this, follow these steps:
  1. In the MbfInstalledDatabases table, delete any records in which the Database_Name field contains the new database name. To do this, follow these steps:
    1. Open SQL Server Management Studio or SQL Server Enterprise Manager.
    2. Click the system database for Microsoft Dynamics SL.
    3. To delete the records, run the following statement.
      DELETE from MbfInstalledDatabases where Database_Name = 'XXX'
      Note Replace the XXX placeholder with the name of the company database.
  2. Run SQL Configuration. To do this, follow these steps:
    1. Click Start, click Control Panel, and then click Add or Remove Programs.
    2. In the Currently installed programs list, click Microsoft Business Portal, and then click Change.
    3. Click SQL Configuration, click Next, and then click Install.
    4. Click Finish.

More Information


You may receive either of the following error messages when you perform the steps in the "Resolution" section. If you receive either of these error messages, see the appropriate article in the Microsoft Knowledge Base.
Error message 1
This installation has detected that the framework has failed to load during a previous installation. The SQL Configuration mode cannot be used to initialize the framework.
For more information about this error message, click the following article number to view the article in the Microsoft Knowledge Base:

912962 Description of issues that may occur when you install Business Portal together with the Microsoft .NET Framework 2.0

Error message 2
Unable to ascertain if Business Portal needs to be upgraded
For more information about this error message, click the following article number to view the article in the Microsoft Knowledge Base:

923665 How to uninstall Business Portal 3.0