Microsoft CRM: Data Conversion - Import from Act!

Best Software Act! is very popular CRM for smallL_CONTACT.JOBTITLE");oValue =
and mid-size organization. This system attractscField.GetValue(cList[i]);if (oValue != null
business owner by its low price, plus system is&&
very easy to use. However if your business is!(oValue.ToString().Trim().Equals("")))strContactXml
growing you should reach the moment to+= "[CDATA[" + Regex.Replace(oValue.ToString(),
implement more advanced CRM solution. Natural"\r\n", "
question is - how do we convert the data from") + "]]";o This is only portion of the data, that
Act! to new CRM solution and the mapping ofcould be transferred into CRM, the whole list of
your objects for conversion. You would probablyfields is too long for small article, but your could
like to avoid operator data entry with potentialdesign the whole list of desired fields. Please, pay
numerous errors and mistypes. Assuming thatspecial attention to replace
you are IT specialist, we'll give you technical sideHTML tag - this is required for text data transfer
of Act to MS CRM data migration:o First youinto CRMo Next is import application creation. We
need to download Act! SDK from Best Softwarewill not describe here connection to MS CRM
websiteo Install Act! SDK on the computer, wheredetails - please read Microsoft CRM SDK if you
you plan to do programmingo We'll useneed this examples. We'll concentrate on the
asynchronous data export/import model, thisnature of the import.
means that we'll design the system, containingThe XML export file should look like this:
two parts: export into XML and this XML fileTA[1234 W. Big
import into the CRMo Lets code Act! data export6]][CDATA[Toy
application, we'll use C# to address ActB2DAD}o Reading, parsing and MS CRM object
Framework classes, we'll need these libraries:usingcreation look is relatively simple:
Act.Framework;usingMicrosoft.Crm.Platform.Proxy.BizUser bizUser =
Act.Framework.Activities;usingnew Microsoft.Crm.Platform.Proxy.BizUser();
Act.Framework.Companies;usingICredentials credentials = new
Act.Framework.ComponentModel;usingNetworkCredential(crmUsername, crmPassword,
Act.Framework.Contacts;usingcrmDomain);bizUser.Url = crmDir +
Act.Framework.Database;using"BizUser.srf";bizUser.Credentials = credentials;
Act.Framework.Groups;usingMicrosoft.Crm.Platform.Proxy.CUserAuth userAuth
Act.Framework.Histories;using= bizUser.WhoAmI();
Act.Framework.Lookups;using// CRMContact proxy object
Act.Framework.MutableEntities;usingMicrosoft.Crm.Platform.Proxy.CRMContact contact
Act.Framework.Notes;using= new Microsoft.Crm.Platform.Proxy.CRMContact
Act.Framework.Opportunities;using();contact.Credentials = credentials;contact.Url =
Act.Framework.Users;using Act.Shared.Collections;ocrmDir + "CRMContact.srf";
To connect to Act! database:CorrectXML("Contacts.xml", userAuth.UserId);
ActFramework framework = newStreamReader reader =
ActFramework();framework.LogOn("ActFile.OpenText("Contacts.xml");string input =
Username", "password", "SERVER", "Database");onull;while ((input = reader.ReadLine()) != null)
Now we need Act field names to map them with{string strContactId = contact.Create(userAuth,
the fields in the MS CRM:private voidinput);
ShowContactsFieldsDescriptions(ActFrameworkConsole.WriteLine("Contact {0} is created",
framework) {strContactId);log.Debug("Contact " + strContactId
ContactFieldDescriptor[] cFields =+ " is created");
framework.Contacts.GetContactFieldDescriptors();}o Just consider in more details CorrectXML
ContactFieldDescriptor cField;for(int x = 0; x ";function - it places OwnerId into XML contact
ContactFieldDescriptor cField;tree:private void CorrectXML(string fileName,
Object oValue;string userId) {
// First NamecField =File.Move(fileName, fileName + ".old");
L_CONTACT.FIRSTNAME");oValue =StreamReader reader = File.OpenText(fileName +
cField.GetValue(cList[i]);if (oValue != null".old");
&&FileInfo t = new FileInfo(fileName);
!(oValue.ToString().Trim().Equals("")))strContactXmlStreamWriter writer = t.CreateText();string input
+= "[CDATA[" + oValue.ToString() + "]]";= null;while ((input = reader.ReadLine()) != null)
// Last NamecField ={input = Regex.Replace(input,
L_CONTACT.LASTNAME");oValue ="{_REPLACE_ME_}",
cField.GetValue(cList[i]);if (oValue != nulluserId);writer.WriteLine(input);
&&}reader.Close();writer.Close();
!(oValue.ToString().Trim().Equals("")))strContactXmlFile.Delete(fileName + ".old");
+= "[CDATA[" + oValue.ToString() +}o Finally, we are launching export, import,
"]]";elsestrContactXml += "" + "N/A" + "";opening MS CRM and looking at the contact list,
// SalutationcField =transferred from Act!o Separate task would be
L_CONTACT.SALUTATION");oValue =Sales data from Act!, Notes etc. - we plan to
cField.GetValue(cList[i]);if (oValue != nulldescribe them in the future articles
&&Good luck with integration! If you want us to do
!(oValue.ToString().Trim().Equals("")))strContactXmlthe job - give us a call 1-630-961-5918 or
+= "[CDATA[" + oValue.ToString() + "]]";1-866-528-0577!
// Job TitlecField =