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

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"]

) ;

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies ? USA nationwide Great Plains, Microsoft CRM customization company, based in Chicago, California, Texas, Florida, New York, Georgia, Colorado, Oregon, Washington, Canada, UK, Australia and having locations in multiple 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 can contact Andrew: 1-866-528-0577 andrewk@albaspectrum.com.

akarasev@albaspectrum.com

In The News:


pen paper and inkwell


cat break through


What To Do When Windows Wont Boot

When Windows fails to boot it is normally caused by... Read More

Microsoft RMS ? Great Plains Integration ? Overview For IT Specialist

Microsoft Great Plains and Microsoft Retail Management System (Microsoft RMS)... Read More

Manufacturing Outsourcing: Microsoft Great Plains Implementation, Customization & Reporting

Manufacturing in the USA is far away down from mid... Read More

Microsoft Blues

With the advent of 'Service Pack 2' for Windows XP... Read More

Microsoft Navision Database Selection: C/SIDE or MS SQL Server - Overview For IT Specialist

There are certain pluses and minuses in both cases and... Read More

Enterprise Resource Planning Overview

ERP (Enterprise Resource Planning) Overview covers What is ERP, Brief... Read More

The Secret of the Layer Styles Dialogue

When you double-click a layer in the Layer Palette, you... Read More

Why Stick With Email Clients Like Outlook?

Trying to figure out a stream in banning one email... Read More

What is Software Piracy?

There are several kinds of software piracy. The bottom line... Read More

Groupware and Version History: Collaboration Series #1

This article is the first of a series of articles... Read More

Microsoft Great Plains Implementation in Russia ? Overview for Consultant

Microsoft Business Solutions Great Plains is very popular ERP platform... Read More

IT Strategy for Midsize Business: Microsoft vs. Java, Great Plains & CRM

Midsize business or non-profit organization should decide if one-vendor solution... Read More

Microsoft CRM Conversation Gateway: VoIP - Implementation & Customization

Microsoft CRM is winning market share step-by-step from such the... Read More

New SQL Delta Version 3.1

COMMAND LINE FUNCTIONA powerful command line script processor has been... Read More

A Time-Saving Programming Tactic that Doesn?t Work

Let's say that you have a software project that's under... Read More

Microsoft Great Plains PM: Payables Management

Microsoft Business Solutions Great Plains is marketed for mid-size companies... Read More

Screenplay and Script Writing Software

When it comes to screenplay software each screenwriter needs to... Read More

Data Quality Best Practices for Salesforce.com

Executive SummaryAn effective plan for entering, cleaning and updating the... Read More

Professional XP Style Icons in Software and Website Development

Using professional icons in your application or website can bring... Read More

Microsoft Great Plains Implementation for Midsize & Large Corporation: Lockbox Processing

Microsoft Great Plains is now targeting large and midsize businesses... Read More

An Easy Way to Deal with Email Viruses and Worms

If you feel intimidated when someone tries to teach you... Read More

Microsoft Great Plains: Dexterity vs. eConnect ? FAQ

Microsoft Business Solutions Great Plains, former Great Plains Software Dynamics/eEnterprise... Read More

Software Review: Xsitepro Total Site Management Software

It's not very often I get excited about a software... Read More

Groupware: Avoid the Ad Hoc Shuffle

GroupwareEfforts are continually made to manage the unavoidable ad hoc... Read More

10 Programming Tips

(1) Avoid using the same variable again and again for... Read More

Basic Steps To Optimize Your Internet Security

After seeing many people complain about their weak Internet security... Read More

Constructionalist Parsing - Deciphering Natural Language

The research in the field of Natural Language Processing usually... Read More

OLAP, An Alternative Technology Over Spreadsheets

Are Spreadsheets Robbing your Enterprise of Competitive Advantage?'90% of "average"... Read More

Kick-Ass Performance For Your PC? Its Easy

Is your PC is slow and wimpy? Then you need... Read More

Bridging the Gap between Paper and Data

The cornerstone of successful automated office systems is the ability... Read More

What is Shareware?

Shareware is software that you can try before you buy;... Read More

Spyware - The Internet Devil Of Our Times!

Spyware and Adware infest over 90 percent of computers in... Read More

It?s Back!! WordPerfect?s Amazing Comeback

Have you noticed WordPerfect is gearing up for a comeback... Read More