Share via


Cannot delete old relationships in CRM4 after UR7 or UR8

Issue:

In Dynamics CRM 4.0 (with rollup 7 and 8) administrators can't delete old relationships.

When you try to remove some relationships you’ll receive an error “invalid argument”. If you collect traces you’ll see  the following error:

Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Number: 0x80040203

Error Message: The Value of Primary Key Attribute: customerrelationshipid is not set Error Details: The Value of Primary Key Attribute: customerrelationshipid is not set

Cause:

ConverseRelationshipId has NULL fields.  The deletion service is incorrectly grabbing records and marking them to be null due to a SQL syntax problem. The update is using a "where exists" instead of a "where in" command. The exist command grabs all since it’s really treated as a Boolean field. Since there is a record marked for deletion it returns true and all rows in the table will be updated.

Solution:

Run the following query against the MSCRM database for the installation where this issue is occurring:

select COUNT(*) from CustomerRelationshipBase where ConverseRelationshipId IS null

If the query result is different than zero please proceed with this steps:

Install Update rollup 9 or higher Rollup
UR9 has a fix that solves this issue from happening for new Relationships.

Update Rollup 9 for Microsoft Dynamics CRM 4.0 is available

https://support.microsoft.com/default.aspx?scid=kb;EN-US;977650

Update Rollup 9 will stop the issue from happening going forward with new relationships but does not fix the existing data.

In order to get the old relationships fixed please open a support request with Microsoft.

 

Regards

EMEA CRM Team