Skip to main content
Skip table of contents

Database Upgrade '{org}' Version 38 to Version 39 Failed

Description: When upgrading to MobileTech from an older version, some users have received the following error message:

Database upgrade '{org}' version 38 to version 39 failed:
************************************************************************

Exception: System.InvalidOperationException
Id: 0f9a60f4-3e80-4344-ad04-8b96f04c63d5
Message: Unable to update attribute 'resco_mobiledevice.resco_ownerid': Specified type 'UniqueIdentifier' does not match attribute 'resco_mobiledevice.resco_ownerid' type 'String'!
Source: XRMServer.Data

IMPORTANT

If you attempted to upgrade before performing these steps when it was required, it is advisable to restore rescoxrm_config and the {org}_RESCOXRM database(s) and start over. 

Solution:

Step 1: Check for an Existing Issue of Previously Non-updated Resco Base Column Attributes

A type of 1 indicates the problem exists.

In SQL Server Management Studio, run the following against the {org}_RESCOXRM database:

select type from metadata$attribute where entityid = (select id from metadata$entity where name = 'resco_mobiledevice') and name = 'resco_ownerid'

Step 2: Set the Metadata Attributes to What They Should Be

In SQL Server Management Studio, run the following against the {org}_RESCOXRM database:

/* Upgrade the table to good condition */

ALTER TABLE [resco_mobiledevice] ALTER COLUMN [resco_ownerid] UNIQUEIDENTIFIER

update metadata$attribute set type = 0 where entityid = (select id from metadata$entity where name = 'resco_mobiledevice') and name = 'resco_ownerid'

Step 3: Perform an IISRESET as an Administrator

To run the IISRESET:

  1. Select the Windows Start icon.

  2. In the search box, type cmd.

  3. Right-click on cmd.exe and select Run as administrator.

  4. At the command prompt, type IISRESET.

  5. Press Enter.

  6. When Internet services successfully restarted appears, type exit.

  7. Press Enter.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.