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
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;
}
}
{
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;
}
}