globehall.com globehall.com
Main :> About Us :> Place Your Link :> Security & Privacy :> Terms & Conditions :> Add Your Article
Search:   
Add URL
 
 

Academics & Learning

 

Sports

 

Hygiene & Health

 

Drink & Food

 

Automobile & Automotive

 

Estate & Realty

 

Fashion & Relationships

 

Companies & Business

 

Issues & News

 

Indoor Games

 

Computers & Software

 

Self Management

 

Jobs & Employment

 

Hotels & Travel

 

Medicine & Treatment

 

Technology & Science

 

Investment & Finance

 

Entertainment

 

Teens & Kids

 

Art & Creative

 

Garden & Home

 

Policies & Law

 

Shopping Online

 

People & Society

 

Main › Computers & Software › Computer Software
 

Microsoft CRM Customization: Integration with Third Party SQL Application/Database

 
Author: Andrew Karasev

Microsoft CRM Client Relationship Management package from Microsoft Business Solutions was initially designed to be customizable with Microsoft Visual Studio.Net and one of its programming languages C#.Net or VB.Net. You can use ADO.Net, Web Service, Transact SQL scripting and stored procedures, deploy such SQL Server tools as Linked Server to all ODBC/OLEDB compliant database, including ORACLE, Sybase, Ingress, DB2, Unidata, Pervasive SQL, Ctree and even Lotus Notes/Domino.

In this small article we would like to give you the clue on programming the integration with SQL third party Database.

First use Microsoft CRM SDK to initiate communication with Microsoft CRM, we have 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 set with the name of the platform Web server

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

// VirtualDirectory should be set with the name of the Microsoft

// CRM Virtual Directory on the platform Web server

string VirtualDirectory = "mscrmservices";

string strDir = "http://" + Server + "/" + VirtualDirectory + "/";

// BizUser proxy object

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

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

oBizUser.Url = strDir + "BizUser.srf";

// CRMAccount proxy object

Microsoft.CRM.Proxy.CRMAccount account = new Microsoft.CRM.Proxy.CRMAccount ();

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

account.Url = strDir + "CRMAccount.srf";

Then you use ADO.Net for calling stored procedure with parameters to do the integration 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"]

);

Author Bio:
Andrew Karasev is a proclaimed scripter. Andrew likes to write articles about this topic.
You can search for this article using: free software, free software downloads, cheap computer software, discount software
 
 
 

Related Articles

 
Eight Website Pitfalls, and How to Avoid Them
 
How Google Page Rank Works
 
The Pros of Email List Building
 
Broadband Internet - You got it, now what?
 
Read This Article if You Want to Get to Know Me Better
 
Matters About Nokia And Your Need For A Free Ringtone
 
Site Linking and Search Engine Strategies: Key Rules
 
HTML Editors 101 - Smaller Is Better
 
What is Anime?
 
The Host With The Most
 
 
 
   Main :> Security & Privacy :> Terms & Conditions
© 2008 www.globehall.com All Rights Reserved.