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


Ukraine IT Myths Dispersed

While Ukraine is becoming a new popular IT outsourcing destination,... Read More

Software Automation Helps Increase your Bottom Line

When you own a small business, time is money. And... Read More

Microsoft Great Plains Customization Tools ? Overview

Former Great Plains Software Dynamics/eEnterprise, and currently Microsoft Business Solutions... Read More

C++ Tutorials: 3, Program Flow (If, Else, While, For)

Program Flow is what you think it is. How the... Read More

How To Make Good Use of Spreadsheets

Most computer users use spreadsheets software such as Microsoft Excel... Read More

Five Reasons for Using an O/R Mapping Tool

So, why should you use any O/R mapping tool? I... Read More

Microsoft eCommerce Web-development: Great Plains eConnect .Net ? Highlights for Programmer

In our small article we'll consider Microsoft Business Solutions Great... Read More

Software Piracy

SOFTWARE PIRACY We regularly hear reports... Read More

Microsoft CRM: Implementation, Customization, Support ? Consultant Overview

Microsoft Business Solutions CRM is present several years on the... Read More

Microsoft Great Plains Security Setup - Overview For Consultant

Microsoft Business Solutions Great Plains is very good fit for... 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

Passwords Used In Microsoft Word Documents

You would like to protect your documents, wouldn't you? Reasons... Read More

MCP Market News: Microsoft SQL Server & SQL Reporting Services

Are you ready? SQL Server 2005, the next-generation data management... Read More

Helping Newbies Understand Professional Software

The Windows registry is a huge database that ensures normal... Read More

Choose your Java Wisely

Java has come along a long way. Many would agree... Read More

Linux for Home Users

Hey Guys! Don't raise your eyebrows or fear by hearing... Read More

Mapping Software: Putting Data Visualization on the Map

Mapping Software Improves Data VisualizationFrom the outset, it is important... Read More

Online PowerPoint Presentation ? Convert PowerPoint to Flash

Although we don't know whether Microsoft ever envisioned such a... Read More

These Items Are A Must Before Making The Decision To Purchase Any Off-The-Shelf Software

1. What determines the software price? Is it Per Seat... Read More

Internet Relay Chat - A Basic Introduction

What is IRC?IRC is Internet Relay Chat. It is a... Read More

About Microsoft Sysprep (System Preparation) Utility (Windows 2000)

The Microsoft system preparation utility for Windows 2000 is a... Read More

Microsoft Great Plains eCommerce ? Stored Procedures Approach

Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More

Who Is Minding Your Sensitive Data?

Stealing company information used to be the specialty of spies... Read More

Separate Anti-Keylogging Protection: Who Needs it Most?

If there still are few unprotected computers left, I haven't... Read More

Microsoft CRM Custom Design & Development: SDK, C#, SQL, Exchange, Integration, Crystal Reports

Microsoft CRM is new player on the CRM software... Read More

Put Some Pizazz in Your Software Arsenal

The software giants don't do everything and don't always produce... Read More

Off The Record - Tips For Picking Recording Software

Need software to record your voice, streaming audio or musical... Read More

Microsoft Great Plains SOP: Sales Order Processing

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

Microsoft Great Plains Implementation for Large Corporation ? Overview for VP IT

Microsoft Business Solutions Great Plains was historically designed to serve... Read More

Crystal Reports for Microsoft Great Plains ? Overview for Developer

Microsoft Great Plains is main accounting / ERP application... Read More

Managing Stress in the Computer Industry - Five Steps to a Stress-free Life

It would be easy to think, like most people apparently... Read More

Adware, What Is It?

Adware is a type of Spyware program that displays some... Read More

How to Make Attractive and Effective PowerPoint Presentations

Microsoft PowerPoint has dramatically changed the way in which academic... Read More