Link to home
Start Free TrialLog in
Avatar of IT-Services-TI
IT-Services-TI

asked on

Why are we getting a SQL error when trying to re-assign a record in MS CRM 2013

Hi everyone,

Since migrating from MS CRM 4.0 to 2011 and then immediately from 2011 to 2013, the "Assign" feature is no longer working for some records. We cannot re-assign those records using the Assign button or the lookup field regardless of our security role (even System Administrator). When we try it we get a SQL error and the log file says there is a duplicate activity owner.

We have been able to work around this temporarily by changing the "Assigned To" user from the SQL database directly for some specific records but this is bad practice.

We are trying to figure out how to fix those records permanently the right way. Does anyone have a clue to why it is doing this and how we can fix it permanently?

Thank you,
Stéphane Laplante
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Hi,

Can you post the logs here?
Avatar of IT-Services-TI
IT-Services-TI

ASKER

Absolutely. Here it is:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: There should be only one owner party for an activityDetail:
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ErrorCode>-2147220989</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>There should be only one owner party for an activity</Message>
  <Timestamp>2016-07-29T14:04:08.8346317Z</Timestamp>
  <InnerFault i:nil="true" />
  <TraceText i:nil="true" />
</OrganizationServiceFault>
Hi,

Can you confirm if there is any plugin or custom code written on the same entity for update message?

In case, the code exists, check if there is any "AssignRequest" is executed through organizationService object?

AssignRequest should be replaced with update request with "ownerid" field.
Hi Rikin,

We do have a plugin running on this entity. It is called Xbitz.Crm.AdvancedCRMAutoNumber and its purpose is to do an autonumbering feature for custom entities. We need to give permissions to the users on this plugin in order for them to create records for most entities, including the Activity entity.

The issue could very well be related to this plugin. How would I go to verify this in the plugin? Do I have to export the plugin solution to my Workstation? If so what do I do from there?

Note that I verified the javascript code running on this entity and it is not causing the issue. To be certain I disabled the javascript code on the form and tried it again and got the same SQL error pop-up.

Let me know.
Thank you!
Stéphane
ASKER CERTIFIED SOLUTION
Avatar of Rikin Shah
Rikin Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This item priority has lowered after investigating the symptoms more thoroughly. It seems to be affecting only two records at the current time. That being said we won't be working on it for a while so I am closing the thread and I am pretty certain that the solution resides in the suggestion you gave us. Thank you very much for helping!