Pages

Tuesday, April 29, 2014

MS Dynamics CRM for Outlook Client - The server address (URL) is not a Microsoft Dynamics CRM Server

In Outlook Client, i clicked the Configure Microsoft Dynamics CRM for Outlook



i entered the server url, then press "Test Connection" button, i got the "Ther server address (URL) is not ac MS Dynamics CRM Server error. 



Tuesday, April 15, 2014

Migrating selected entities data from UAT MS Dynamics 2011 to PROD MS Dynamics CRM 2011

Migrating selected entities data from UAT MS Dynamics 2011 to PROD MS Dynamics CRM 2011

Recently i engaged a new project to migrating data from one CRM server to another CRM server for selected entities.
Challenging work is moving email related entity data to another CRM server.
Here i going to discuss only email related entity code work.

I did this work using both CRM service and direct sql update.

1) i created 2 service, let assume one is UAT and another is PROD
public static OrganizationServiceProxy U_CRMServiceProxy
{
    get
    {
    var uri = new Uri(U_URI);

    //Authenticate using credentials of the logged in user;      
    var cntCredentials = new ClientCredentials();
    cntCredentials.Windows.ClientCredential.Domain = Domain;
    cntCredentials.Windows.ClientCredential.UserName = U_User;
    cntCredentials.Windows.ClientCredential.Password = U_Pass;
    //cntCredentials.Windows.ClientCredential = CredentialCache.DefaultNetworkCredentials;

    var serviceProxy = new OrganizationServiceProxy(uri, null, cntCredentials, null);
    //serviceProxy.ServiceConfiguration.CurrentServiceEndpoint.Behaviors.Add(new ProxyTypesBehavior());
    serviceProxy.EnableProxyTypes();

    return serviceProxy;
    }
}

Dynamics CRM 2011 Activities Code & Configuration

Dynamics CRM 2011 Activities Code & Configuration

1.Activities Code

//Added Service Reference, reference name is 'ServiceEmailAudit'
//Code to Create Activities, this will get input field and call webservice
using System;
using System.Activities;
using System.ServiceModel;
using Microsoft.Xrm.Sdk;
using Microsoft.Xrm.Sdk.Workflow;
using System.Linq;
using DNS.CRM.Entities;

namespace CRM.EmailAudit.Activities
{
    public class GenerateDAEmail : CodeActivity
    {
        [RequiredArgument]
        [Input("Report Name")]
        public InArgument<string> iReportName { get; set; }

Tuesday, April 1, 2014

MS Dynamics CRM 2011 E-mail Router Configuration

1) Go to MS Dynamics CRM 2011 E-mail Router -> select MS Dynamics CRM 2011 E-mail Router Configuration Manager

2) Configure Incoming and Outgoing profile

#9628 - An error occurred while delivering the e-mail message with subject

Application Event Log

#9628 - An error occurred while delivering the e-mail message with subject "Subject Line CRMDEV:00170032" in mailbox email@yahoo.com for delivery to http://crmserver.ses.com/DNS/. System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: systemuser With Id = 03e6194a-c517-e211-b15b-0050568c5ad0 Does Not Exist (Fault Detail is equal to Microsoft.Xrm.Sdk.OrganizationServiceFault).

This error will be display, if any duplicate E-mail Address existed in CRM records.
If yes then delete that record and verify is the issue persist.

select * from EmailSearchBase where EMailAddress = 'email@yahoo.com'

It will list all the email assigned entities.

Take the 'ParentObjectTypeCode' id passed to the below sql.
select * from entityview where ObjectTypeCode in (1,8,10117,2020)

Now verify the record exist or not, if delete it.

for example, EmailSearchBase table record list, 8 is system user
EmailAddress    ParentObjectId                ParentObjectTypeCode
email@yahoo.com    03E6194A-C517-E211-B15B-0050568C5AD0    8

select * from systemuser where systemuserid  = '03E6194A-C517-E211-B15B-0050568C5AD0'
there is no record in system user.

so i delete the entry from EmailSearchBase table.

Everything works perfectly, all the error stops.