|
Best Software Act! is very popular CRM for small and mid-size organization. This system attracts business owner by its low price, plus system is very easy to use. However if your business is growing you should reach the moment to implement more advanced CRM solution. Natural question is - how do we convert the data from Act! to new CRM solution and the mapping of your objects for conversion. You would probably like to avoid operator data entry with potential numerous errors and mistypes. Assuming that you are IT specialist, we'll give you technical side of Act to MS CRM data migration: ? First you need to download Act! SDK from Best Software website ? Install Act! SDK on the computer, where you plan to do programming ? We'll use asynchronous data export/import model, this means that we'll design the system, containing two parts: export into XML and this XML file import into the CRM ? Lets code Act! data export application, we'll use C# to address Act Framework classes, we'll need these libraries: using Act.Framework;
using Act.Framework.Activities;
using Act.Framework.Companies;
using Act.Framework.ComponentModel;
using Act.Framework.Contacts;
using Act.Framework.Database;
using Act.Framework.Groups;
using Act.Framework.Histories;
using Act.Framework.Lookups;
using Act.Framework.MutableEntities;
using Act.Framework.Notes;
using Act.Framework.Opportunities;
using Act.Framework.Users;
using Act.Shared.Collections;
? To connect to Act! database: ActFramework framework = new ActFramework(); framework.LogOn("Act Username", "password", "SERVER", "Database"); ? Now we need Act field names to map them with the fields in the MS CRM: private void ShowContactsFieldsDescriptions(ActFramework framework) { ContactFieldDescriptor[] cFields = framework.Contacts.GetContactFieldDescriptors(); ContactFieldDescriptor cField; for(int x = 0; x < cFields.Length; x++) { cField = cFields[x]; Console.WriteLine("Table Name: {0}", cField.TableName); Console.WriteLine("Column Name: {0}", cField.ColumnName); Console.WriteLine("Display Name: {0}", cField.DisplayName); Console.WriteLine("ACT Field Type: {0}", cField.ACTFieldType); Console.WriteLine(""); } } ? Let's get contact list and create the file for import instructions to MS CRM: ContactList cList = framework.Contacts.GetContacts(null); FileInfo t = new FileInfo("Contacts.xml"); StreamWriter stw = t.CreateText(); ? Now we form export data: for (int i = 0; i < cList.Count; i++) { string strContactXml = ""; ContactFieldDescriptor cField; Object oValue; // First Name cField = framework.Contacts.GetContactFieldDescriptor("TBL_CONTACT.FIRSTNAME"); oValue = cField.GetValue(cList[i]); if (oValue != null && !(oValue.ToString().Trim().Equals(""))) strContactXml += "[CDATA[" + oValue.ToString() + "]]"; // Last Name cField = framework.Contacts.GetContactFieldDescriptor("TBL_CONTACT.LASTNAME"); oValue = cField.GetValue(cList[i]); if (oValue != null && !(oValue.ToString().Trim().Equals(""))) strContactXml += "[CDATA[" + oValue.ToString() + "]]"; else strContactXml += "" + "N/A" + ""; // Salutation cField = framework.Contacts.GetContactFieldDescriptor("TBL_CONTACT.SALUTATION"); oValue = cField.GetValue(cList[i]); if (oValue != null && !(oValue.ToString().Trim().Equals(""))) strContactXml += "[CDATA[" + oValue.ToString() + "]]"; // Job Title cField = framework.Contacts.GetContactFieldDescriptor("TBL_CONTACT.JOBTITLE"); oValue = cField.GetValue(cList[i]); if (oValue != null && !(oValue.ToString().Trim().Equals(""))) strContactXml += "[CDATA[" + Regex.Replace(oValue.ToString(), "
|