locked
There should be only one owner party for an activity RRS feed

  • Question

  • Hi All

    Receiving the following error when re-assigning an account in CRM 4. The problem only seems to exist with accounts created pre CRM 4 upgrade; any new accounts can be reassigned without generating the same error.

     

    System:

    Windows Server 2003, STD SP2 x86

    CRM 4.0.7333.3 (upgraded from CRM 3)

     

    Windows Server 2003, STD SP1 x86

    SQL Server 2005 Developer Edition 9.00.3042.00

     

     

    Error Message:

     

    Microsoft CRM Error Report:

    Error Description:

    There should be only one owner party for an activity


    Error Details:

    There should be only one owner party for an activity


    Full Stack:

    [CrmException: There should be only one owner party for an activity]

       at Microsoft.Crm.ObjectModel.GenericActivityServiceBase.InternalAssign(BusinessEntity entity, SecurityPrincipal assignee, ExecutionContext context)

       at Microsoft.Crm.BusinessEntities.CascadeEngine.AssignDB(BusinessEntityMoniker moniker, SecurityPrincipal assignee, ExecutionContext context)

       at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Assign(BusinessEntityMoniker moniker, SecurityPrincipal assignee, ExecutionContext context)

     

    [TargetInvocationException: Exception has been thrown by the target of an invocation.]

       at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

       at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

       at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)

       at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IPluginExecutionContext context)

       at Microsoft.Crm.Extensibility.PluginStep.Execute(PipelineExecutionContext context)

       at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)

       at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)

       at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)

       at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(String messageName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, PropertyBag fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)

       at Microsoft.Crm.Sdk.RequestBase.Process(Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)

       at Microsoft.Crm.Sdk.RequestBase.Process(CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)

       at Microsoft.Crm.Sdk.CrmServiceInternal.Execute(RequestBase request, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId)

       at Microsoft.Crm.Sdk.InProcessCrmService.Execute(Object request)

       at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()

       at Microsoft.Crm.Application.Platform.DataSource.Assign(Guid entityId, String entityType, SecurityPrincipal principal)

       at Microsoft.Crm.Application.Platform.CommunicationListeners.AssignRouteOnCreateUpdateListener.AssignEntity(Entity entity, LookupValue owner)

       at Microsoft.Crm.Application.Platform.CommunicationListeners.AssignRouteOnCreateUpdateListener.AssignRouteEntity(Entity entity, LookupValue owner)

       at Microsoft.Crm.Application.Platform.CommunicationListeners.AssignRouteOnCreateUpdateListener.HandlePostEvent(PlatformCommand command, Response response, Boolean wasForUpdate)

       at Microsoft.Crm.Application.Platform.CommunicationListeners.CommunicationListener.HandlePostEvent(PlatformCommand command, Response response)

       at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.ExecuteInternal()

       at Microsoft.Crm.Application.Platform.ServiceCommands.UpdateCommand.Execute()

       at Microsoft.Crm.Application.Platform.EntityProxy.Update(Boolean performDuplicateCheck)

       at Microsoft.Crm.Application.Platform.EntityProxy.Update()

       at Microsoft.Crm.Application.Forms.AppForm.HandleFormEventAssign(Boolean gridRefreshCallbackAdded)

       at Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId)

       at Microsoft.Crm.Application.Forms.EndUserForm.Initialize(Entity entity)

       at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity, String formType)

       at Microsoft.Crm.Application.Forms.CustomizableForm.Execute(Entity entity)

       at Microsoft.Crm.Web.SFA.AccountDetailPage.ConfigureForm()

       at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)

       at System.Web.UI.Control.PreRenderRecursiveInternal()

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

     

    [HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown.]

       at System.Web.UI.Page.HandleError(Exception e)

       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

       at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

       at System.Web.UI.Page.ProcessRequest()

       at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)

       at System.Web.UI.Page.ProcessRequest(HttpContext context)

       at ASP.uniqueworld_sfa_accts_edit_aspx.ProcessRequest(HttpContext context)

       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()

       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     


    Other Message:


    Error Number:

    0x80040203


    Source File:

    Not available


    Line Number:

    Not available

     

    Any help is greatly appreciated

    Cheers

    Jason 

     

    Friday, June 13, 2008 4:55 AM

Answers

  • Normally I wouldn't recommend making direct data changes to the database, as it cause data problems. However, you already have a data problem, and simply deleting the record from the activityparty table won't have any other effects in the database.

     

    A safer option would be try deleting the activity via the CRM user interface first, and only if that deosn't work make the change in SQL

    Wednesday, June 18, 2008 8:31 AM
    Moderator

All replies

  • Jason,

     

    Do you have any callouts/plugins against the assign event which upgraded from CRM3?

     

    Jim

     

    Sunday, June 15, 2008 10:19 AM
    Moderator
  • Hi Jim

    Thanks for the reply. I don't believe so. I checked the isv.config.xml and also the callout.config.xml files and couldn't see anything. Is there anywhere else I should check?

    Cheers
    Jason
    Monday, June 16, 2008 12:45 AM
  • My guess is there was some data corruption with the CRM 3 data. The most likely cause would be unsuppported direct data modifications via SQL.

     

    The following SQL queries may help diagnose the problem.

     

    -- Check if any activities have more than one owner. This should return no data

    select activityid, count(*) from filteredactivityparty
    where participationtypemask = 9
    group by activityid
    having count(*) > 1

     

    -- Check if any account records have been set as an activity owner. Again, this should return no data

    select activityid, partyid, partyidname
    from filteredactivityparty
    where participationtypemask = 9
    and partyobjecttypecode = 1

     

    -- Read information about activityparties for a given account. Replace <Account Name> with the name of an account

    select a.ownerid, a.owneridname, ap.partyid, ap.partyidname, ap.participationtypemask
    from filteredactivityparty ap
    join filteredaccount a
    on ap.partyid = a.accountid
    where a.name = '<Account Name>'

     

    Monday, June 16, 2008 5:27 AM
    Moderator
  • Hi David

    Thanks for the reply. Your first query returns one result. The second query returns nothing. The third query returns eleven results.

    All eleven results are exactly the same.

    How do I proceed from here?

    Cheers
    Jason
    Monday, June 16, 2008 6:37 AM
  • Hello

    I ran the following SQL command to view the other details:

    select * from filteredactivityparty
    where activityid = 'F9C7B766-458F-4EE8-8B45-49A12BD6E885'

    I can see there are two "Owner" fields in the "participationtypemaskname" column.

    Can I delete one of these rows to fix the issue without causing problems throughout the database?

    Cheers
    Jason
    Wednesday, June 18, 2008 6:56 AM
  • Normally I wouldn't recommend making direct data changes to the database, as it cause data problems. However, you already have a data problem, and simply deleting the record from the activityparty table won't have any other effects in the database.

     

    A safer option would be try deleting the activity via the CRM user interface first, and only if that deosn't work make the change in SQL

    Wednesday, June 18, 2008 8:31 AM
    Moderator
  • Did you ever get this resolved ??  I just upgraded to CRM4  and I get this same error for some  Advanced finds and  when I try to reassign a contact.

     

    Robert

     

    Wednesday, August 6, 2008 12:43 AM
  • Has anyone found a real solution to this issue ... We have been experiencing the same issue with our upgraded implementation as well.  Seems to be only on records that were created prior to the upgrade (most of the records that seem to have the issue actually go back to when we were on 1.2).  We have tried some of the suggestions ( DavidJennaway 's post ) and this has worked for some of the accounts we wish to reassign however we are still seeing it with others..
    Wednesday, August 19, 2009 6:12 PM
  • Hi!

    We also have this error message. We did upgrade from 1.2 to 3.0 and then on the same day to 4.0. Only accounts that had been created with 1.2 can't be reassigned. The 1st SQL statement from David Jennaway gives some result and the 2nd one gives nothing.
    Is there a solution for this "bug" without editing the SQL Database?

    Best regards
    CSN22
    Tuesday, December 15, 2009 11:52 AM
  • Hello everybody,
    we have the same error after upgrading from CRM 3.0 to 4.0. I have a solution but it is difficult and ugly although I use some scripts. Maybe it can help you if your error is really the same like the one I have. Unfortunately the solution is no one-liner but a five-page-PDF. So if you give me an email address, I send it to you.

    Harald
    Friday, February 12, 2010 2:50 PM
  • @KaterKarlo
    Thanks for the offer. But we did solve the problem already. A call to MS support did solve it. They gave us some SQL-Statements and some pretty long code script. After running this it was solved.

    Best regards
    CSN22
    Friday, February 12, 2010 3:14 PM
  • @CSN22
    Wow, as I called them some times ago, they were not able to help me. Can you send the code to me or is it confidential?
    kind regards
    Harald
    Friday, February 12, 2010 6:37 PM
  • These scripts are very interesting for resolve the problem. Can you yend me the sentences. I experiment the same error with some records.
    Thanks
    Wednesday, March 17, 2010 5:36 PM
  • @KaterCarlo & Edwin Roa
    Since it was a paid incident with Microsoft support, I strongly believe that I am not allowed to post this code and the instructions here in an open forum.

    If you can convince me, that I am wrong with my opinion and such informations can be spreaded as I like, I will post it here.

    Regards
    CSN22

    Thursday, March 18, 2010 8:32 AM
  • Hi.

    Yes, you are rigth, the Microsoft Support license agreement prohibits the distribution of this material.  Thanks for your reply.

     

    Edwin

    Friday, March 19, 2010 7:28 PM
  • Hi ,

     

    Can you send me instruction and script to resolve issue with reassingning account as we are having same issue and trying to resolve from last couple of weeks.

     

    Regards.

    Chitra

     

     

    Tuesday, March 23, 2010 3:36 PM
  • FInally i got this issue fixed in our system.Email me if anyone wants to know how to resolve this issue.

    Tuesday, April 20, 2010 8:52 PM
  • Hi Chitra,

    What's your email, I would like to see if I can resolve this on our site too. Or you can email me at gpollock   at    challow.net

    Cheers
    Gavin

    Thursday, June 24, 2010 10:46 AM
  • Hi Chitrarasan, I have same problem and applied all solutions described above. There is no result. Could you send the solution to my e-mail?Thank you. cagdas at cagdaskaval.com
    Thursday, May 5, 2011 8:56 AM
  • Hi Chitrarasan

     

    The error message appears on my CRM system in production. Could I get the script at your earliest convenience please? My email is wkww2004@gmail.com.

     

    Thanks.


    KASIM
    Friday, September 23, 2011 5:37 AM
  • I am also getting this same error and would be greatful if you can send me the code and fix to dfawcett1337@hotmail.com.  Thanks
    Wednesday, October 12, 2011 4:16 PM
  • You can also receive this message if there is no owner record in the ActivityPartyBase table

    -Get all records missing owner records in ActivityPartyBase (Should return no results)

     

    Select * from ActivityPointerBase apb

    WHERE  (SELECT 0

                FROM ActivityPartyBase party

                WHERE party.ActivityId = apb.ActivityId

                AND party.ParticipationTypeMask = 9) is null

    -Show activities with missing owner records by accountnumber (should return no results)

     

    Select apb.[subject], * from ActivityPointerBase apb

    inner join AccountBase a

          on a.AccountId = apb.RegardingObjectId

    WHERE  (SELECT 0

                FROM ActivityPartyBase party

                WHERE party.ActivityId = apb.ActivityId

                AND party.ParticipationTypeMask = 9) is null

          And

          a.AccountNumber = '9107'

    Wednesday, April 4, 2012 11:28 PM
  • Hi Chitrarasan,

    could you help me and sent me the instructions how to resolve this at vroonius at outlook.com

    thanks in advance!

    Eric 

    Tuesday, October 23, 2012 6:13 PM
  • hi chitrarasan,

    can you email me the solution at steve.rauda@chrsolutions.com

    Tuesday, February 12, 2013 6:43 AM
  • Hi Chitrarasan, I have same problem and applied all solutions described above. There is no result. Could you send the solution to my e-mail?Thank you. hakgun05@gmail.com
    Wednesday, April 17, 2013 12:53 PM