Microsoft CRM Customization Integration with Third Party SQL ApplicationDatabase

May 29th, 2008

Microsoft CRM - Client Relationship Management collection from Microsoft Business Solutions was initially fashioned to be customizable with Microsoft Visual Studio.Net and digit of its planning languages - C#.Net or VB.Net. You crapper ingest ADO.Net, Web Service, Transact SQL scripting and stored procedures, deploy much SQL Server tools as Linked Server to every ODBC/OLEDB willing database, including ORACLE, Sybase, Ingress, DB2, Unidata, Pervasive SQL, Ctree and modify Lotus Notes/Domino.

In this diminutive article we would same to provide you the evidence on planning the combining with SQL ordinal band Database.

First - ingest Microsoft CRM SDK to make act with Microsoft CRM, we hit it in C#:

String[] arr1 = coll.AllKeys;

int loop1, loop2;

for (loop1 = 0; loop1 0?1:arr1.Length); loop1++)

{

String[] arr2 = coll.GetValues(arr1[loop1]);

for (loop2 = 0; loop2 < arr2.Length; loop2++)

{

strAccountId = arr2[loop2].Replace(”}”,null);

strAccountId = strAccountId.Replace(”{”,null);

}

}

if (Page.IsPostBack==false)

{

// Server should be ordered with the study of the papers Web server

string Server = ConfigurationSettings.AppSettings[”ServerName”];

// VirtualDirectory should be ordered with the study of the Microsoft

// CRM Virtual Directory on the papers Web server

string VirtualDirectory = “mscrmservices”;

string strDir = “http://” + Server + “/” + VirtualDirectory + “/”;

// BizUser agent object

Microsoft.CRM.Proxy.BizUser oBizUser = newborn Microsoft.CRM.Proxy.BizUser ();

oBizUser.Credentials = System.Net.CredentialCache.DefaultCredentials;

oBizUser.Url = strDir + “BizUser.srf”;

// CRMAccount agent object

Microsoft.CRM.Proxy.CRMAccount statement = newborn Microsoft.CRM.Proxy.CRMAccount ();

account.Credentials = System.Net.CredentialCache.DefaultCredentials;

account.Url = strDir + “CRMAccount.srf”;

Then you ingest ADO.Net for occupation stored machine with parameters to do the combining job:

try

{

string SQLStatement=”ICS_UpdateAccountPrivate ‘”+

strAccountId +”‘ , ‘” + this.TextBoxWorkPerformed.Text +

“‘ , “+doubleEncode(System.Double.Parse(this.TextBoxAnnualRevenue.Text))+” , “+

intEncode(System.Int32.Parse(this.TextBoxNumberOfEmployees.Text.Replace(”,”,”")))+” , “+

doubleEncode(System.Double.Parse(this.TextBoxAverageGrowthRate.Text))+” , “+

“‘”+this.DropDownListOwnership.SelectedItem.Text +”‘ , “+

intEncode(System.Int32.Parse(this.RadioButtonList.SelectedItem.Value))+” , “+

intEncode(System.Int32.Parse(this.TextBoxCredit.Text.Replace(”,”,”")))+” , ‘”+

this.TextBoxComments.Text+”‘”;

System.Data.SqlClient.SqlConnection tmpConnection =

new System.Data.SqlClient.SqlConnection(ConfigurationSettings.AppSettings[”ConnectionStringICS”]

);

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies - army broad Great Plains, Microsoft CRM customization company, supported in Chicago, California, Texas, Florida, New York, Georgia, Colorado, Oregon, Washington, Canada, UK, state and having locations in binary states and internationally (www.albaspectrum.com), he is CMA, Great Plains Certified Master, Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer. You crapper occurrence Andrew: 1-866-528-0577 andrewk@albaspectrum.com.

akarasev@albaspectrum.com

Tags: , , , , , , , , , , , ,
Close
E-mail It