locked
CRM 2011 On-Premise - Cannot "Track in CRM" from Outlook 2010 RRS feed

  • Question

  • I'm having issues with my CRM 2011 On-Premise Deployment, with the Outlook (2010) client installed. When I try to track any email I receive from a contact in the CRM by clicking "Track in CRM" in Outlook, I get the message "The requested record was not found or you do not have sufficient privileges to view it."

    I have verified that the respective contact does exist in CRM, and the email in the CRM matches the one from which I received the email in Outlook.

    The user account I'm using to link the record has "System Administrator" permissions in CRM, so I doubt this is a permissions issue.

    I am also not using Live ID, which I understand can cause a similar symptom for online deployments. This deployment is On-Premise, and I couldn't find any information on this issue.

    Any suggestions?

    Thanks,

    Dave


    Thursday, April 28, 2011 2:14 AM

Answers

  • Based on the error message provided and experiencing with previous cases, I believe that you have orphaned records in your EmailSearchBase table. Please run the following query in SQL Server Managment Studio to see if orphaned records exist in the organization database:

    select * from EmailSearchBase where ParentObjectTypeCode = 2 and ParentObjectId not in (select ContactId from ContactBase)

    If you receive results, you will need to run the following command to clean up the EmailSearchBase table. Importante Note: I would encourage you to backup the database before proceeding with the SQL statement.

    delete * from EmailSearchBase where ParentObjectTypeCode = 2 and ParentObjectId not in (select ContactId from ContactBase)

    You may still receive errors because there may be orphaned AccountBase records in the EmailSearchBase table. You will just need to modify the SQL query to search for the AccountId as follows:

    select * from EmailSearchBase where ParentObjectTypeCode = 1 and ParentObjectId not in (select AccountId from AccountBase)

    If you receive results, you will want to run the follow AccountBase query:

    delete * from EmailSearchBase where ParentObjectTypeCode = 1 and ParentObjectId not in (select AccountId from AccountBase)

     

    I hope that this helps!


    Best regards,

    Lance Squires
    Partner Online Technical Community
    -----------------------------------------------------------------------------------------
    We hope you get value from our new forums platform! Tell us what you think:
    http://social.microsoft.com/Forums/en-US/partnerfdbk/threads
    ------------------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.



    • Proposed as answer by Lance Squires Saturday, October 22, 2011 4:00 AM
    • Edited by Lance Squires Saturday, October 22, 2011 10:57 PM
    • Marked as answer by Dave Maslen Tuesday, November 8, 2011 1:37 PM
    Saturday, October 22, 2011 3:59 AM

All replies

  • Have you apply Update Rollup 1?  It has a fix to resolve this issue.

     

    http://mscrmonline.wordpress.com/2011/04/07/update-rollup-1-is-available-for-ms-crm-2011/

     


    Follow Workopia on Twitter

    Good CRM Links: http://www.workopia.com/Links.htm
    My CRM Blog: http://microsoft-crm.spaces.live.com

    Thursday, April 28, 2011 3:03 AM
    Moderator
  • I installed Rollup 1 this morning, and re-tested. I still have the same issue.

    Neither the Track in CRM, or Set Regarding, are working. When I right click on an email in my inbox, and select Track in CRM, nothing appears to happen. When I select Set Regarding, I can select an opportunity, and that opportunity shows against the email. However, when I go in the CRM, the email is neither linked to the contact or the opportunity. There are no email activities.

    Any other suggestions?

    Cheers,

    Dave

    Thursday, April 28, 2011 2:00 PM
  • I have done exactly the same thing (installing rollup 1) and the problem persists. And I am about to rip all my hair out with it.... :) Has no one got a fix for this? It cannot be anything with permission settings, not in my case at least, as I have complete Admin access to everything..... And this is not giving me much hope for MS CRM at this point.....
    Thursday, May 5, 2011 1:42 PM
  • Anyone? Microsoft?

    This is a pretty serious issue, and I'm not the only one suffering from it.

    Similar to Kenny, I have full administrative privileges, so this can't be a permissions issue.

    We need a fix. This is going to delay my rollout!

    Thanks,

    Dave

    Friday, May 6, 2011 3:38 PM
  • I don't see anything in Rollup 1 that fixes this issue either. A similar issue for the Online version was addressed:

    Assume that you sign up for an organization in Microsoft Dynamics CRM Online. You track an email message in which the primary email address is the same as the email address that you used to sign up for the organization. In this situation, you receive the following error message:

    The requested record was not found or you do not have sufficient permissions to view it.

    This addresses nothing in the On-Premise version. As I understand it, the online issue was related to the use of Live ID, which is not a variable in my On-Premise deployment.

    Something else is going on here.

    Does anyone have an On-Premise deployment where this is actually working (tracking an email via the Outlook client to CRM is working)? That would help me determine whether this is environmental, or in fact, a bug.

    Thanks,

    Dave


    Friday, May 6, 2011 3:45 PM
  • I do have almoste the same problem, when I first start outlook, open up a new mail and select to track it, it will track just fine, the second mail however will not track, I trrying to send to the same mail adress but i just get an error that says:

    "An error has occurred. Try this action again. If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organizations Microsoft Dynamics CRM Administrator. Finally, you can contact Microsoft support. Do you want to send the e-mail? If you click Yes, the e-mail will be sent out, but no corresponding activity will be created in Microsoft Dynamics CRM."

    If I the restart Outlook, the first mail will be tracked, the I have the same problem again if I try to send more e-mails...

    Without this function I thinking of looking at some other CRM systems...

     

    please help...

     

    /Patrik

    Friday, May 13, 2011 8:02 AM
  • Same issue here. On roll up 2, deployed client roll up 2 as well, still isn't resolved. Doesn't appear to be a problem if I send to an external email (such as my Gmail account) but can't send to other CRM users without getting the same error
    JeremySadler
    Wednesday, June 29, 2011 6:03 PM
  • I also have the same problem. were you able to find any resolution?
    N. R. Chakraborty
    Friday, July 8, 2011 2:53 PM
  • Anything come of this?  I am having the same issue as of Rollup 3....
    Thursday, August 11, 2011 6:01 PM
  • Can you confirm that you have UR #1 and/or #2 installed on both the CRM Application Server as well as you local Outlook client?

    I'm using Outlook 2010 on a Win7 machine with 4 different CRM 2011 tenants and when I set each one as the Syncing client all 4 tenants I can Track multiple emails and set the Regarding field with no issues.

    Have you tried navigating through the CRM outlook client? That is, either Clicking the CRM organization button (if on Outlook 2010) and navigating through CRM, opening records, etc.; or clicking on the Dynamics CRM folder (below your native Outlook folders if on Outlook 2007) and navigating through CRM? Just want to make sure that this is an issue solely with the Ribbon button or something more systemic in the Outlook client.

    Finally, have you tried running a trace, using the Outlook diagnostic tool, or contacted MSFT CRM Support?


    --Dodd
    • Marked as answer by Donna EdwardsMVP Thursday, August 18, 2011 4:18 AM
    • Unmarked as answer by Dave Maslen Thursday, August 18, 2011 1:03 PM
    Thursday, August 11, 2011 6:18 PM
  • I have both Online & OnPremise and am able to track e-mails from Outlook as well as Set Regarding.

    Regards, Donna

    Thursday, August 18, 2011 4:19 AM
  • I ran the trace, and it appears that I'm getting the following when trying to track an email for this user: Principal user (Id=50f9c86d-a2b3-e011-9198-005056bc2cb4, type=8) is missing prvWriteUserEntityUISettings.

    However, there is no error message at all kicked out in the Outlook client. For all intents and purposes, it looks like it "works". However, when you then navigate to that contact and check the activity log, the email is not there.

    What does the prvWriteUserEntityUISettings relate to?

    Dave

    Thursday, August 18, 2011 1:05 PM
  • So I added the necessary privilege to that user account, and tried again. Trace below. It appears it is not finding the proper contactid. I have confirmed the the email address for the email I am trying to track does exist against that contact account, so I don't understand where it is getting that contactid from (Contact With Id = 2807e16d-29b3-e011-a440-005056bc2cb4 Does Not Exist).

    I checked the database, and as expected, that contactid doesn't exist.

    Where on earth would this contactid be coming from?

    Dave

     

    [2011-08-18 09:18:46.108] Process:OUTLOOK |Organization:00000000-0000-0000-0000-000000000000 |Thread:  5(MSCRM:-RegistryWatcher.RegTrackerThreadProc) |Category: Platform |User: 00000000-0000-0000-0000-000000000000 |Level: Verbose | RegistryKeyChangedEventHandler.Invoke
    	at RegistryKeyChangedEventHandler.Invoke(Object sender, EventArgs e)
    	at RegistryWatcher.RegTrackerThreadProc()
    	at ThreadHelper.ThreadStart_Context(Object state)
    	at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
    	at ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
    	at ThreadHelper.ThreadStart()
    >Received Registry Change Notification. Current Status = 0 New Status = 0
    [2011-08-18 09:18:47.060] Process:OUTLOOK |Organization:cf682c22-02b3-e011-a440-005056bc2cb4 |Thread:  25 |Category: Application.Outlook |User: 00000000-0000-0000-0000-000000000000 |Level: Error | CrmServiceForOutlook.Execute
    	at CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)
    	at EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote(String messageId, String subject, String from, String to, String cc, String bcc, Double receivedon, String submittedBy, String importance, String body, IDynamicEntityCollectionForOutlook attachments, Int32 attachmentCount, String entityXml, String regardingId, Int64 regardingObjectType, Int32& notification)
    	at ThreadsSupport.ExecuteThreadProc(ThreadProc threadProc, IntPtr parameter)
    >FaultExceptionDetails: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Contact With Id = 2807e16d-29b3-e011-a440-005056bc2cb4 Does Not ExistDetail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
     <ErrorCode>-2147220969</ErrorCode>
     <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
      <KeyValuePairOfstringanyType>
       <d2p1:key>CallStack</d2p1:key>
       <d2p1:value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">  at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.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.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)
      at Microsoft.Crm.Extensibility.ExternalMessageDispatcher.Execute(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId)
      at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
      at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)</d2p1:value>
      </KeyValuePairOfstringanyType>
     </ErrorDetails>
     <Message>Contact With Id = 2807e16d-29b3-e011-a440-005056bc2cb4 Does Not Exist</Message>
     <Timestamp>2011-08-18T13:18:38.007189Z</Timestamp>
     <InnerFault>
      <ErrorCode>-2147220969</ErrorCode>
      <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
       <KeyValuePairOfstringanyType>
        <d3p1:key>CallStack</d3p1:key>
        <d3p1:value xmlns:d5p1="http://www.w3.org/2001/XMLSchema" i:type="d5p1:string">  at Microsoft.Crm.BusinessEntities.BusinessProcessObject.GetValuesFromDatabase(String entityName, Guid entityId, Boolean allowNonUniqueRows, ArrayList attributes, ArrayList extraConditions, Boolean isRetrieveUnpublished, ExecutionContext context)
      at Microsoft.Crm.BusinessEntities.SecurityAttributes..ctor(SecurityTraits traits, Guid objectId, Boolean allowNonUniqueRows, ArrayList attributes, ExecutionContext context)
      at Microsoft.Crm.BusinessEntities.SecurityAttributes..ctor(SecurityTraits traits, Guid objectId, ArrayList attributes, ExecutionContext context)
      at Microsoft.Crm.BusinessEntities.SecurityExtension.GetSecurityAttributes(BusinessEntity entity, AttributeMetadata attribute, ExtensionEventArgs e, Relationship&amp; relationship, SecurityTraits&amp; traits)
      at Microsoft.Crm.BusinessEntities.SecurityExtension.CheckAppendAccess(BusinessEntity entity, ExtensionEventArgs e)
      at Microsoft.Crm.ObjectModel.ActivityPartySecurityExtension.CheckAppendAccess(BusinessEntity entity, ExtensionEventArgs e)
      at Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandlerAppendAppendToPrivilegeCheck(SecurityTraits traits, SecurityAttributes attributes, ExtensionEventArgs e)
      at Microsoft.Crm.BusinessEntities.SecurityExtension.PreCreateHandler(ExtensionEventArgs e, Object sender)
      at Microsoft.Crm.BusinessEntities.BusinessProcessObject.PreCreateEventHandler.Invoke(Object sender, ExtensionEventArgs e)
      at Microsoft.Crm.BusinessEntities.BusinessProcessObject.Create(IBusinessEntity entity, ExecutionContext context)
      at Microsoft.Crm.ObjectModel.ActivityPartyService.Create(IBusinessEntity entity, ExecutionContext context)
      at Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.CreateCommunicationParties(BusinessEntityMoniker moniker, CommunicationActivity activity, ExecutionContext context)
      at Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.Create(IBusinessEntity entityInterface, ExecutionContext context)
      at Microsoft.Crm.ObjectModel.EmailService.Deliver(Boolean userPromote, Guid emailId, String messageId, String subject, String from, String to, String cc, String bcc, DateTime receivedOn, String submittedBy, String importance, String body, BusinessEntityCollection attachments, Guid campaignResponseId, Entity emailDeltaEntity, ExecutionContext context)
      at Microsoft.Crm.ObjectModel.EmailService.DeliverPromote(Guid emailId, String messageId, String subject, String from, String to, String cc, String bcc, DateTime receivedOn, String submittedBy, String importance, String body, Entity extraProperties, BusinessEntityCollection attachments, ExecutionContext context)</d3p1:value>
       </KeyValuePairOfstringanyType>
      </ErrorDetails>
      <Message>Contact With Id = 2807e16d-29b3-e011-a440-005056bc2cb4 Does Not Exist</Message>
      <Timestamp>2011-08-18T13:18:38.007189Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />
     </InnerFault>
     <TraceText i:nil="true" />
    </OrganizationServiceFault>
    
    Server stack trace: 
      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
    
    Exception rethrown at [0]: 
      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
      at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)
      at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
      at Microsoft.Crm.Application.SMWrappers.ClientOrganizationServiceProxy.ExecuteCore(OrganizationRequest request)
      at Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)
    
    [2011-08-18 09:18:47.076] Process:OUTLOOK |Organization:cf682c22-02b3-e011-a440-005056bc2cb4 |Thread:  25 |Category: Application.Outlook |User: 00000000-0000-0000-0000-000000000000 |Level: Error | EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote
    	at EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote(String messageId, String subject, String from, String to, String cc, String bcc, Double receivedon, String submittedBy, String importance, String body, IDynamicEntityCollectionForOutlook attachments, Int32 attachmentCount, String entityXml, String regardingId, Int64 regardingObjectType, Int32& notification)
    	at ThreadsSupport.ExecuteThreadProc(ThreadProc threadProc, IntPtr parameter)
    > TraceException: Unhandled Exception: System.Runtime.InteropServices.COMException: Contact With Id = 2807e16d-29b3-e011-a440-005056bc2cb4 Does Not Exist
      at Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)
      at Microsoft.Crm.Application.SMWrappers.EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote(String messageId, String subject, String from, String to, String cc, String bcc, Double receivedon, String submittedBy, String importance, String body, IDynamicEntityCollectionForOutlook attachments, Int32 attachmentCount, String entityXml, String regardingId, Int64 regardingObjectType, Int32& notification)
    
    [2011-08-18 09:18:47.076] Process:OUTLOOK |Organization:cf682c22-02b3-e011-a440-005056bc2cb4 |Thread:  25 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error | ThreadsSupport.ExecuteThreadProc
    	at ThreadsSupport.ExecuteThreadProc(ThreadProc threadProc, IntPtr parameter)
    >Entity id is null or empty, skip deleting the entity 'email'

     

    Thursday, August 18, 2011 1:24 PM
  • What record do you use to "Set Regarding"?
    --Dodd
    Thursday, August 18, 2011 1:31 PM
  • The same contact record.

    Interestingly enough, the Set Regarding function seems to be working now. However, anytime I try to "Track in CRM", it still doesn't work, and the record still indicates "This email is not tracked in CRM".

    Thursday, August 18, 2011 1:35 PM
  • Silly question, but when you click "Track in CRM", are you tracking it against an Email within the user's Inbox?

    Also, how does it behave when you track the email using a new Outlook email? Does this work as expected, or are you seeing the same issues? Also, how are you currently tracking emails in your email settings (tracking token, smart matching)?


    --Dodd
    Thursday, August 18, 2011 2:45 PM
  • Dodd,

    When I click "Track in CRM", I have an email in the users inbox highlighted. It is a received email from a contact that is in CRM and has an email match.

    I tried to send a new email, and track it in CRM. Same problem. I was able to "Set Regarding" though.

    I checked my system settings, and they are default (I believe).

    Use tracking token is checked with Prefix: CRM, Deployments base tracking number: 0, Number of digits for user numbers: 3, Number of digists for incremental message counter:3, and Tracking token preview: CRM:0001001

    Use Smart Matching is also checked with Filter subject keywords:^[\s]*([\w]+\s?:[\s]*)+, Max # of subject keywords or recipients: 20, Max difference allowed between subject keywords: 0, Min number of recipients required to match: 2

    Do I have a setting wrong? This is a bit different from CRM 4.0.

    Cheers,

    Dave

    Thursday, August 18, 2011 3:31 PM
  • Did this problem get fixed with rollup 3?

    Is google toolbar installed on the computer where you are trying to track?

    Have you tried disabling all plugins in outlook and IE and track?

    Are there any antivirus programs installed that might be causing the problem?

    Try clearing the cache for windows/IE, temporary internet files etc.


    Halldór Jóhannsson
    Thursday, September 29, 2011 11:01 AM
  • We installed Rollup 3 and we still have same issue. Can anyone from MS comment on this ?
    Thursday, September 29, 2011 11:21 AM
  • If you want to obtain Microsoft's attention, you will need to open a support ticket.  There is no guarantee that a post in the forum will get the attention of a Microsoft support engineer.

    I hope it helps


    Regards, Donna

    Thursday, September 29, 2011 9:47 PM
  • I have a support ticket open with MS and am working it with them now. I will report back any resolutions or findings in case it will help others.

    This issue is occurring on every single workstation we deploy with Rollup 3 of the Outlook client (50+ machines now).

    Cheers,

    Dave

    Monday, October 3, 2011 2:06 PM
  • Hi Dave,

    We were seeing the same issue. When sending emails from outlook and hitting the Track in CRM or Set Regarding button we would get the error message "An error occured promoting this item to Microsoft Dynamics CRM. The Microsoft Cynamics CRM server could not be contacted or the user has insufficient permissions to perform this action"

    Looks like this is a default generic message and may not be related to the permissions at all as you stated with being system admin.

    Here are some of the things we know that causes this error message.

    1) Address book. Update the users CRM Option to match on all object and all records.

    2) Email Attachment size. Make sure the under the system settings the Email Attachment size is set to the max.

    3) Any plugins that trigger off the message "Create" on the entity "email". Try disabling all plugins that trigger when an email is created. This includes plugins that use the "any entity". If there is an error in the plugin because of missing info when creating an email from outlook the error is not reported and the message above is reported instead, which can cause some confusion.

    Hope that helps,

    Sokha

    Monday, October 3, 2011 2:17 PM
  • Hi Dave,

    Was support able to identify a solution for the issue?


    Regards, Donna

    Monday, October 10, 2011 8:41 PM
  • Hi Donna, MS has not yet provided a solution to this problem. I am still troubleshooting with them. As soon as we reach a resolution, I will post my findings. Thanks, Dave
    Tuesday, October 11, 2011 2:51 PM
  • Thank you!

    Regards, Donna

    Wednesday, October 12, 2011 11:16 PM
  • our issue is if you define track a mail before send when you then click on send the following error message:

    message translated to english means:

    You do not have the necessary rights to access the MS CRM object or perform the requested operation. Check with the microsoft dynamics crm administrator, for more information. They want to send the email? To yes if they , then an email is sent while, but there is no corresponding activity created in microsoft dynamics crm

     


    greetz dao
    Thursday, October 13, 2011 8:21 AM
  • >Web Service Plug-in failed in SdkMessageProcessingStepId: {3F98BA...}; EntityName: email; Stage: 25; MessageName: Update; AssemblyName: Microsoft.Crm.AuditCreateUpdatePlugin, Microsoft.Crm.Audit, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad5; ClassName: Microsoft.Crm.AuditCreateUpdatePlugin; Exception: Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

    Workaround

    Disable auditing on any Party List Attributes (To, From, CC or BCC) that might contain anything other than only CRM entity record references.


    greetz dao
    Friday, October 14, 2011 1:51 PM
  • Based on the error message provided and experiencing with previous cases, I believe that you have orphaned records in your EmailSearchBase table. Please run the following query in SQL Server Managment Studio to see if orphaned records exist in the organization database:

    select * from EmailSearchBase where ParentObjectTypeCode = 2 and ParentObjectId not in (select ContactId from ContactBase)

    If you receive results, you will need to run the following command to clean up the EmailSearchBase table. Importante Note: I would encourage you to backup the database before proceeding with the SQL statement.

    delete * from EmailSearchBase where ParentObjectTypeCode = 2 and ParentObjectId not in (select ContactId from ContactBase)

    You may still receive errors because there may be orphaned AccountBase records in the EmailSearchBase table. You will just need to modify the SQL query to search for the AccountId as follows:

    select * from EmailSearchBase where ParentObjectTypeCode = 1 and ParentObjectId not in (select AccountId from AccountBase)

    If you receive results, you will want to run the follow AccountBase query:

    delete * from EmailSearchBase where ParentObjectTypeCode = 1 and ParentObjectId not in (select AccountId from AccountBase)

     

    I hope that this helps!


    Best regards,

    Lance Squires
    Partner Online Technical Community
    -----------------------------------------------------------------------------------------
    We hope you get value from our new forums platform! Tell us what you think:
    http://social.microsoft.com/Forums/en-US/partnerfdbk/threads
    ------------------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.



    • Proposed as answer by Lance Squires Saturday, October 22, 2011 4:00 AM
    • Edited by Lance Squires Saturday, October 22, 2011 10:57 PM
    • Marked as answer by Dave Maslen Tuesday, November 8, 2011 1:37 PM
    Saturday, October 22, 2011 3:59 AM
  • Lance,

    I think you hit the nail on the head. This is exactly what I have been looking at with MS CRM support. I seem to have a lot of orphaned contact and account records in the EmailSearchBase table. I suspect this is a result of a DTS I ran that fed data from another SQL database to CRM. I subsequently had to remove all of those records, but did not clean out the EmailSearchBase table (SQL didn't see this as a dependency).

    Support is trying to reproduce the issue to confirm, and then will let me know if it is safe to remove those records as you suggested.

    I will post back once I have more information.

    Needless to say, make sure you have no duplicate email addresses (contacts, accounts, or users) in your system, otherwise tracking email will fail.

    Dave

    Monday, October 24, 2011 3:08 PM
  • Lance,

    After speaking with MS, they agreed this was the best approach. I have followed your procedures, and cleaned up the EmailSearchBase tables.

    Thanks for your help!

    Dave

    Tuesday, November 8, 2011 1:38 PM
  • I have recently come across this error myself in our system (CRM 2011, Outlook 2010) however it is only on random occasions.

    I have had several users able to track in CRM for a number of emails and then suddenly one will populate with the error message "The requested record was not found or you do not have sufficient permissions to view it. Do you want to send the e-mail? If you click Yes, the e-mail will be sent our but no corresponding activity will be created in Microsoft Dynamics CRM." In searching our CRM we are able to locate the contact with the email address being used.

    Subsequent emails will track just fine however the one that erred won't work if you try it again.

    Is scrubbing the EmailSearchBase table something that has to be done periodically (we did it at our initial installation)?

    Thanks

    Scott

    Friday, February 10, 2012 8:43 PM