locked
MessageProcessor fail to process message 'Assign' for 'contact'. RRS feed

  • Question

  • Hallo Zusammen

    Ich habe folgendes Problem. Ich kann bei Contacts, Acounts keinen neuen Owner zuweisen.

    Wir benutzen CRM 4.0 rollout 10. Mir sagt die Fehlermedlung sehr wenig. Über hilfreiche Tipps würde ich mich freuen.

    -------------

    Ich habe etwas herausgefunden:

    Crm Exception: Message: , ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException: Invalid column name 'q'.

    auf was für eine Spalte wil er da zugreifen?

    Kann mir jemand sagen wie ich dan die SQL abfrage komme?

    --------------

    [2010-06-02 18:20:41.1] Process: w3wp |Organization:63d38025-748e-4875-8c95-f04fdae314c1 |Thread:   10 |Category: Platform |User: 319665c4-becd-4c71-bae6-fdca46557b48 |Level: Error | MessageProcessor.Execute
    >MessageProcessor fail to process message 'Assign' for 'contact'.

    [2010-06-02 18:20:41.1] Process: w3wp |Organization:63d38025-748e-4875-8c95-f04fdae314c1 |Thread:   10 |Category: Exception |User: 319665c4-becd-4c71-bae6-fdca46557b48 |Level: Error | CrmException..ctor
     at CrmException..ctor(String message, Exception innerException, Int32 errorCode)
     at SoapExtensionExceptionHandlerBase.GetCrmException(Exception exception)
     at InProcessCrmService.Execute(Object request)
     at PlatformCommand.ExecuteInternal()
     at AssignRouteOnCreateUpdateListener.AssignEntity(Entity entity, LookupValue owner)
     at CommunicationListener.HandlePostEvent(PlatformCommand command, Response response)
     at PlatformCommand.ExecuteInternal()
     at UpdateCommand.Execute()
     at EntityProxy.Update(Boolean performDuplicateCheck)
     at AppForm.HandleFormEventAssign(Boolean gridRefreshCallbackAdded)
     at AppForm.RaiseDataEvent(FormEventId eventId)
     at EndUserForm.Initialize(Entity entity)
     at CustomizableForm.Execute(Entity entity, String formType)
     at ContactDetailPage.ConfigureForm()
     at AppUIPage.OnPreRender(EventArgs e)
     at Control.PreRenderRecursiveInternal()
     at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     at Page.ProcessRequest()
     at Page.ProcessRequest(HttpContext context)
     at dw_sfa_conts_edit_aspx.ProcessRequest(HttpContext context)
     at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
     at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
     at ApplicationStepManager.ResumeSteps(Exception error)
     at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
     at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
     at HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
     at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
    >Crm Exception: Message: , ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException: Invalid column name 'q'.
    Invalid column name 's'.
    Invalid column name 'y'.
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
       at Microsoft.Crm.BusinessEntities.CrmCascadeDBCollection.Collect(CascadeActionType actionType, Guid entityId, Int32 entityOtc, Guid ownerId)
       at Microsoft.Crm.BusinessEntities.CascadeEngine.AssignDB(BusinessEntityMoniker moniker, SecurityPrincipal assignee, ExecutionContext context)
    [2010-06-02 18:20:41.1] Process: w3wp |Organization:63d38025-748e-4875-8c95-f04fdae314c1 |Thread:   10 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ErrorInformation.LogError
    >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.

    Error Message: 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.

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

    Source File: Not available

    Line Number: Not available

    Request URL: http://vmchsrv091/dW/sfa/conts/edit.aspx?id={ECF27101-365F-DF11-9954-0050568519F8}

    Stack Trace Info: [SqlException: Invalid column name 'q'.
    Invalid column name 's'.
    Invalid column name 'y'.]
       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
       at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
       at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
       at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
       at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
       at Microsoft.Crm.CrmDbConnection.InternalExecuteNonQuery(IDbCommand command)
       at Microsoft.Crm.CrmDbConnection.ExecuteNonQuery(IDbCommand command, Boolean impersonate)
       at Microsoft.Crm.BusinessEntities.CrmCascadeDBCollection.Collect(CascadeActionType actionType, Guid entityId, Int32 entityOtc, Guid ownerId)
       at Microsoft.Crm.BusinessEntities.CascadeEngine.AssignDB(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.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.CommunicationListeners.AssignRouteOnCreateUpdateListener.AssignEntity(Entity entity, LookupValue owner)
       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.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.Web.SFA.ContactDetailPage.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.ProcessRequest(HttpContext context)
       at ASP.dw_sfa_conts_edit_aspx.ProcessRequest(HttpContext context)
       at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

     

    Wednesday, June 2, 2010 4:26 PM

Answers

  • Hi Jonathan, the SQL code you have provided is unsupported and does not fix all the errors introduced by the regression error in Update Rollup 7. The supported method is to reinstall Update Rollup 8 or 9 after creating or importing a new organization. Update Rollup 10 fixes the issue.

    Regards,

    Neil


    Neil Benson, CRM Addict at Customery Ltd.You can reach me on LinkedIn or Twitter, and you're welcome to sign up to Customery, an online community for UK-based Dynamics CRM people.

    Thursday, June 3, 2010 11:15 AM
    Moderator

All replies

  • Jonathan,

    Sometimes a stored procedure is missed on the org which will produce similiar symptoms (RU10 fixes this issue going forward, but does not seem to be retroactive) http://support.microsoft.com/kb/980627/en-us.  I believe it is named 'dbo.p_CascadeCollectAssign'.  You can be sure by starting a SQL Profiler trace and capturing the stored procedures Crm is calling.  We have fixed this in the past by copying the stored procedure from a working deployment.

    Hope this helps,

    --Scott

    Thursday, June 3, 2010 1:36 AM
  • Solution:

    Durch Reinport der Funktion und anschlissend der Stored Procedures. Konnten wir wider Contacte Assinged.

     

    Tutorial

    Reinport im  SQL Server 2005

    1. "DB"Programmabiltiy\ Funktions\Table-valued Functions\dbo .fn_CollectForCascadeAssigne

    2. "DB"Programmabiltiy\Stored Procedures \dbo .p_CascadeCollectAssig

    -------------

    File --  dbo .fn_CollectForCascadeAssigne

    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go




    ALTER proc [dbo].[p_CascadeCollectAssign]
    (
        @operation_type nvarchar(40),
        @root_entity_otc int,
        @root_entity_oid uniqueidentifier,
        @isOffline int,
        @old_owner uniqueidentifier
    )
    as
    begin
        set nocount on
       
        begin
            insert into #CascadeCollectAssign select o, t, p, q, s, y
                     from dbo.fn_CollectForCascadeAssign
                     (@root_entity_oid
                     ,@root_entity_otc
                     ,@isOffline
                     ,@old_owner
                     )
            update #CascadeCollectAssign set processed = 2
        end
    end

    -------------------

    File -- dbo .p_CascadeCollectAssig

    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go

    ALTER function [dbo].[fn_CollectForCascadeAssign]
    (
      @root_id uniqueidentifier,
      @root_otc int,
      @isoffline int,
      @old_owner uniqueidentifier
    )
    returns @t table
    (    
       o uniqueidentifier,
       t int,
       p int default 0,
       u uniqueidentifier,
       q uniqueidentifier,
       s int,
       y bit default 0
    )
    as
    begin
    insert into @t values(@root_id,@root_otc,0,@old_owner,N'00000000-0000-0000-0000-000000000000',0,0)
    if(exists(select * from @t where t=9100))begin insert into @t(o,t,p,u,q,s,y) select o.ReportId,9100,0,o.OwningUser,c.o,c.t,1 from Report o,@t c where o.ParentReportId=c.o and c.t=9100 and o.DeletionStateCode=0
    while(@@rowcount <> 0)if(exists(select * from @t where t=9100))insert into @t(o,t,p,u,q,s,y) select o.ReportId,9100,0,o.OwningUser,c.o,c.t,1 from Report o,@t c where o.ParentReportId=c.o and c.t=9100 and o.DeletionStateCode=0 and o.ReportId not in(select o from @t where o=o.ReportId and t=9100) end
    if(exists(select * from @t where t=4400))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4402,0,o.OwningUser,c.o,c.t,1 from CampaignActivity o,@t c where o.RegardingObjectId=c.o and c.t=4400 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(4400,4406)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4401,0,o.OwningUser,c.o,c.t,1 from CampaignResponse o,@t c where o.RegardingObjectId=c.o and c.t in(4400,4406) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.AccountId,1,0,o.OwningUser,c.o,c.t,1 from Account o,@t c where o.ParentAccountId=c.o and c.t=1 and o.DeletionStateCode=0
    while(@@rowcount <> 0)if(exists(select * from @t where t=1))insert into @t(o,t,p,u,q,s,y) select o.AccountId,1,0,o.OwningUser,c.o,c.t,1 from Account o,@t c where o.ParentAccountId=c.o and c.t=1 and o.DeletionStateCode=0 and o.AccountId not in(select o from @t where o=o.AccountId and t=1) end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.ContactId,2,0,o.OwningUser,c.o,c.t,1 from Contact o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.ContactId,2,0,o.OwningUser,c.o,c.t,1 from Contact o,@t c where o.ParentContactId=c.o and c.t=2 and o.DeletionStateCode=0
    while(@@rowcount <> 0)if(exists(select * from @t where t=2))insert into @t(o,t,p,u,q,s,y) select o.ContactId,2,0,o.OwningUser,c.o,c.t,1 from Contact o,@t c where o.ParentContactId=c.o and c.t=2 and o.DeletionStateCode=0 and o.ContactId not in(select o from @t where o=o.ContactId and t=2) end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.InvoiceId,1090,0,o.OwningUser,c.o,c.t,1 from Invoice o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.InvoiceId,1090,0,o.OwningUser,c.o,c.t,1 from Invoice o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.SalesOrderId,1088,0,o.OwningUser,c.o,c.t,1 from SalesOrder o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.SalesOrderId,1088,0,o.OwningUser,c.o,c.t,1 from SalesOrder o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1088))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4209,0,o.OwningUser,c.o,c.t,1 from OrderClose o,@t c where o.SalesOrderId=c.o and c.t=1088 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.QuoteId,1084,0,o.OwningUser,c.o,c.t,1 from Quote o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.QuoteId,1084,0,o.OwningUser,c.o,c.t,1 from Quote o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1084))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4211,0,o.OwningUser,c.o,c.t,1 from QuoteClose o,@t c where o.QuoteId=c.o and c.t=1084 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.ContractId,1010,0,o.OwningUser,c.o,c.t,1 from Contract o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.ContractId,1010,0,o.OwningUser,c.o,c.t,1 from Contract o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.IncidentId,112,0,o.OwningUser,c.o,c.t,1 from Incident o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.IncidentId,112,0,o.OwningUser,c.o,c.t,1 from Incident o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=112))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4206,0,o.OwningUser,c.o,c.t,1 from IncidentResolution o,@t c where o.IncidentId=c.o and c.t=112 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.LeadId,4,0,o.OwningUser,c.o,c.t,1 from Lead o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.LeadId,4,0,o.OwningUser,c.o,c.t,1 from Lead o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=2))begin insert into @t(o,t,p,u,q,s,y) select o.OpportunityId,3,0,o.OwningUser,c.o,c.t,1 from Opportunity o,@t c where o.ContactId=c.o and c.t=2 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=1))begin insert into @t(o,t,p,u,q,s,y) select o.OpportunityId,3,0,o.OwningUser,c.o,c.t,1 from Opportunity o,@t c where o.AccountId=c.o and c.t=1 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=3))begin insert into @t(o,t,p,u,q,s,y) select o.CustomerOpportunityRoleId,4503,0,o.OwningUser,c.o,c.t,1 from CustomerOpportunityRole o,@t c where o.OpportunityId=c.o and c.t=3 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(1088,2,3,1010,1090,4,1,112,1084)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4214,0,o.OwningUser,c.o,c.t,1 from ServiceAppointment o,@t c where o.RegardingObjectId=c.o and c.t in(1088,2,3,1010,1090,4,1,112,1084) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(1084,112,1,4400,4,1090,1010,3,2,1088)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4212,0,o.OwningUser,c.o,c.t,1 from Task o,@t c where o.RegardingObjectId=c.o and c.t in(1084,112,1,4400,4,1090,1010,3,2,1088) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(1088,2,3,4406,1010,1090,4402,4,1,1084,112)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4210,0,o.OwningUser,c.o,c.t,1 from PhoneCall o,@t c where o.RegardingObjectId=c.o and c.t in(1088,2,3,4406,1010,1090,4402,4,1,1084,112) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t=3))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4208,0,o.OwningUser,c.o,c.t,1 from OpportunityClose o,@t c where o.OpportunityId=c.o and c.t=3 and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(112,1084,1,4402,4,1010,4406,1090,3,1088,2)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4207,0,o.OwningUser,c.o,c.t,1 from Letter o,@t c where o.RegardingObjectId=c.o and c.t in(112,1084,1,4402,4,1010,4406,1090,3,1088,2) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(1088,2,3,4406,1090,1010,1,112,1084,4,4402)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4204,0,o.OwningUser,c.o,c.t,1 from Fax o,@t c where o.RegardingObjectId=c.o and c.t in(1088,2,3,4406,1090,1010,1,112,1084,4,4402) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(4402,4,1084,112,1,4700,1090,4406,1010,3,1088,2)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4202,0,o.OwningUser,c.o,c.t,1 from Email o,@t c where o.RegardingObjectId=c.o and c.t in(4402,4,1084,112,1,4700,1090,4406,1010,3,1088,2) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(2,1088,3,4406,1010,1090,112,1,1084,4402,4)))begin insert into @t(o,t,p,u,q,s,y) select o.ActivityId,4201,0,o.OwningUser,c.o,c.t,1 from Appointment o,@t c where o.RegardingObjectId=c.o and c.t in(2,1088,3,4406,1010,1090,112,1,1084,4402,4) and o.DeletionStateCode=0 end
    if(exists(select * from @t where t in(4400,4414,4211,4212,4703,4401,4207,4209,4201,1088,4208,2,1090,4204,4202,4206,1010,4300,3,1,1084,112,4402,4214,4,4210)))begin insert into @t(o,t,p,u,q,s,y) select o.AnnotationId,5,0,o.OwningUser,c.o,c.t,1 from Annotation o,@t c where o.ObjectId=c.o and c.t in(4400,4414,4211,4212,4703,4401,4207,4209,4201,1088,4208,2,1090,4204,4202,4206,1010,4300,3,1,1084,112,4402,4214,4,4210) and o.DeletionStateCode=0 end
    return
    end

     

    gruss

    Jonathan CRM Pimp haha

    Thursday, June 3, 2010 9:30 AM
  • Hi Jonathan, the SQL code you have provided is unsupported and does not fix all the errors introduced by the regression error in Update Rollup 7. The supported method is to reinstall Update Rollup 8 or 9 after creating or importing a new organization. Update Rollup 10 fixes the issue.

    Regards,

    Neil


    Neil Benson, CRM Addict at Customery Ltd.You can reach me on LinkedIn or Twitter, and you're welcome to sign up to Customery, an online community for UK-based Dynamics CRM people.

    Thursday, June 3, 2010 11:15 AM
    Moderator