Microsoft CRM Customization

Microsoft CRM customization techniques are very diversified and based on the whole spectrum of recent Microsoft technologies. The main terms you should know are: Microsoft CRM SDK 1.2 and Visual Studio.Net 2003. And of course you should be familiar with all the legacy internet technologies, such as HTML, XML, XSLT, JavaScript and be good C#/VB/Net developer.

If you are developer who is asked: how do we customize Microsoft CRM – read this and you will have the clues on where to look further.

1. Microsoft CRM SDK – this is software development kit with C# and partly VB.net examples – it is supported by Microsoft Business Solutions technical support. It is all web services based calls, if you are C# .NET developer – you are excellently positioned to do this type of customizations. This is the preferred customization scenarios and this should be easily upgradeable customization.

2. Legacy SQL Data integration. This is also easy and safe. If you have SQL database, sitting on the same or linked SQL Server – you can create ASPX .Net application and simply integrate it into CRM. You can place it on the navigation bar or menu in isv.config – please refer to MS CRM SDK

3. Legacy ASP integration – this is somewhat more sophisticated. You have to deploy HTTP handler to be a middle party between CRM which is .Net based and ASP which is legacy IIS. The trick is – you have to have INI file with security settings to penetrate into MS CRM with proper credentials, calling web service.

4. Microsoft Exchange Programming. Microsoft CRM has Exchange connector – which moves CRM incoming email to MS if it has GUID in its subject. You can alter this logic (for instance - move email to CRM if it doesn’t have GUID but it is from the sender who is contact or account in MS CRM). Refer to MS Exchange SDK onsyncsave event handling. Then simply apply some MS CRM SDK programming

5. Direct SQL touch – in #4 above I described you the scenario with MS Exchange handlers – this would be ideal world if MS CRM SDK does the job. But – in real world this is not always true – you have to do direct flags correction in CRM database (like making Activity closed, moving email attachments/octet streams, etc). This is not supported by MBS technical support – but you can rescue to this technique if you have to make job done.

6. MS CRM Customization tool – you can feel free to use this – this is rather end-user tool and we don’t describe it here – read the manual. We’ve described above the options to use when this tool doesn’t do the job

Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, California, Colorado, Texas, New York, Georgia and Florida, Canada, UK, Australia, Brazil, Mexico (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

akarasev@albaspectrum.com

Microsoft CRM – Typical Customizations

Microsoft CRM was designed to be easily customizable. Microsoft CRM Software Development Kit (MS CRM SDK) which you can download from Microsoft website contains descriptions of the objects or classes, exposed for customization. It has sample code in C# and partially in VB.Net. In Visual Studio.Net you can analyze all the classes, used by Microsoft developers to create MS CRM - you will discover that most of them are not documented in MS CRM SDK. Microsoft will not support your customization if you use undocumented class or do direct SQL access to CRM database.

Let us describe you - programmer, software developer typical cases of MS CRM Customizations.

1. Integration with SQL Server application. If you have legacy system on MS SQL Server - let's say you are transportation company and have in-house developed cargo tracking database. Now in MS CRM you want lookup the shipments for the customer (or account in CRM). This is SDK programming and calling SQL stored proc to retrieve cargo info. Instead of SQL Server you can have other database (ORACLE, MS Access, PervasiveSQL to name a few) - you can access multiple Database platforms via ADO.Net connection from your .Net application, which is easily integrated into MS CRM Account screen.

2. Email capturing in MS CRM. You have customer with email Bill@customer.com. Now you want all the emails that you receive from customer.com domain to be attached to Bill who is account in CRM. This is more difficult customization - you have to create MS CRM SDK web service, that one will be creating email activity and call it from COM+ application - Microsoft Exchange event handler (ONSYNCSAVE database event sink). This example maybe complicated with the following requirement. Imagine that Bill, instead of answering to your email (sent from CRM and processed by CRM-Exchange connector) sends you new message from MS Outlook. Then this email will not follow into MS CRM (because it doesn't have GUID in the header and so is ignored by CRM Exchange connector). If you want to capture these emails - you have to do it in Microsoft Exchange event sink. There maybe scenario when you want to capture and analyze in the sink all the outgoing emails - this is even more complex - y!

ou have to place the sink on transport event.

3. ASP Application integration. You have legacy ASP application, where you capture orders from your customers and you want these orders be transferred to the CRM as activity. Here you understand that ASP doesn't deploy Active Directory security - and the best way is to create HTTP handler and call it from your ASP page. This HTTP handler in turn will call MS CRM SDK web service with predefined (web.config) Active Directory credentials.

Some cautions. Never create your custom SQL objects (like stored procedure, SQL view, table) in MS CRM database. Instead, create your own database and place your objects there. When you see the first caution - you will never try to alter existing CRM objects, like adding new field to the table.

Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

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, New York, Florida, Georgia, Minnesota, Oregon, Arizona, Canada, UK, Australia and having locations in multiple states and internationally (www.albaspectrum.com), he is Microsoft CRM SDK, Great Plains Dexterity, SQL, C#/VB.Net and Crystal Reports developer.


akarasev@albaspectrum.com

Microsoft CRM Selection

Microsoft CRM is recent (2001) CRM answer from Microsoft and attempt top get market share from traditional vendors: Siebel, Oracle, Onyx. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress).

We would like you to give you Microsoft CRM selection advise, based on our MS CRM consulting practice, going back to its inception in 1999. This article is written in FAQ style for beginner level

1. What is your industry – how strange it may look – close to 40% of our clients or so-called orphan clients – who needs help with Microsoft CRM customization are freight forwarding, transportation companies, who needs either improvement in Exchange-CRM connector or MS CRM integration with their freight forwarding system, where they would like to see on the fly resent shipment info. And also to mention freight forwarding companies are usually large (more than 50 CRM users)

2. How comfortable you are with Microsoft technology in-house support – The old-days idea of Apple computer was to make computer absolutely intuitive and working for housewife. Now we know that this is not realized so far. If you compare MS CRM with Siebel – you will see that MS CRM requires y0u to have Microsoft Certified people in staff. Everyone knows that Microsoft is “so innovative” that each product requires daily service packs and patches

3. Do you have Great Plains, Solomon or Navision – CRM is usually integrated with ERP system and if you are looking at MS CRM – you should benefit if you have ERP from Microsoft Business Solutions (Great Plains, Solomon, Navision, Axapta or Small Business Manager - SBM)

4. Operating System Philosophy - Microsoft likes clients who have no UNIX/LINUX/IBM/Apple etc inclination and staked on Microsoft Windows 2003/2000/XP/Longhorn, preferably staying on Intel platform (No AMD Athlon 64)

Have fun in selection and decision. We are here to help you: 1-866-528-0577

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Arizona, Colorado, California, Texas, New York, Georgia and Florida and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.

akarasev@albaspectrum.com

Microsoft CRM Programming Techniques – overview for developer

Microsoft CRM is the CRM answer from Microsoft and it will have all the Microsoft Business Solutions muscles behind.

If you are developer who is asked: how do we customize Microsoft CRM – read this and you will have the clues on where to look further.

1. Microsoft CRM SDK – this is software development kit with C# and partly VB.net examples – it is supported by Microsoft Business Solutions technical support. It is all web services based calls, if you are C# .NET developer – you are excellently positioned to do this type of customizations. This is the preferred customization scenarios and this should be easily upgradeable customization.

2. Legacy SQL Data integration. This is also easy and safe. If you have SQL database, sitting on the same or linked SQL Server – you can create ASPX .Net application and simply integrate it into CRM. You can place it on the navigation bar or menu in isv.config – please refer to MS CRM SDK

3. Legacy ASP integration – this is somewhat more sophisticated. You have to deploy HTTP handler to be a middle party between CRM which is .Net based and ASP which is legacy IIS. The trick is – you have to have INI file with security settings to penetrate into MS CRM with proper credentials, calling web service.

4. Microsoft Exchange Programming. Microsoft CRM has Exchange connector – which moves CRM incoming email to MS if it has GUID in its subject. You can alter this logic (for instance - move email to CRM if it doesn’t have GUID but it is from the sender who is contact or account in MS CRM). Refer to MS Exchange SDK onsyncsave event handling. Then simply apply some MS CRM SDK programming

5. Direct SQL touch – in #4 above I described you the scenario with MS Exchange handlers – this would be ideal world if MS CRM SDK does the job. But – in real world this is not always true – you have to do direct flags correction in CRM database (like making Activity closed, moving email attachments/octet streams, etc). This is not supported by MBS technical support – but you can rescue to this technique if you have to make job done.

6. MS CRM Customization tool – you can feel free to use this – this is rather end-user tool and we don’t describe it here – read the manual. We’ve described above the options to use when this tool doesn’t do the job

Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, California, Colorado, Texas, New York, Georgia and Florida, Canada, UK, Australia and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.


akarasev@albaspectrum.com

Microsoft CRM Programming Secrets – tips for developer

This article is for advanced Microsoft CRM SDK C# developers. It describes the technique of direct SQL programming, when SDK doesn't have the functionality to do the job.

Introduction. Looks like Microsoft CRM becomes more and more popular, partly because of Microsoft muscles behind it. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress).

Here we describe the technique of creating closed activity-email using MS CRM SDK and direct SQL programming.

Imaging something like this. You need to handle incoming email before it is committed to MS Exchange database. You need to analyze if incoming email doesn't have GUID in its Subject (GUID will allow MS CRM Exchange Connector to move email to Microsoft CRM and attach it to the Contact, Account or Lead) - then you still need to lookup MS CRM in case if one of the accounts, contacts or leads has email address that matches with sender email address - then you need to create closed activity-email in MS CRM, attached to the object and placed into general queue.

How to create MS Exchange handler is outside of the scope, please see this article:


http://www.albaspectrum.com/Customizations_Whitepapers/Dexterity_SQL_VBA_Crystal/ExchangeHandlerExample.htm

Now the code below is classical MS CRM SDK and it will create activity email:

public Guid CreateEmailActivity(Guid userId, int objectType, Guid objectId, string mailFrom, CRMUser crmUser, string subject, string body) {

try {

log.Debug("Prepare for Mail Activity Creating");

// BizUser proxy object

Microsoft.Crm.Platform.Proxy.BizUser bizUser = new Microsoft.Crm.Platform.Proxy.BizUser();

ICredentials credentials = new NetworkCredential(sysUserId, sysPassword, sysDomain);

bizUser.Url = crmDir + "BizUser.srf";

bizUser.Credentials = credentials;

Microsoft.Crm.Platform.Proxy.CUserAuth userAuth = bizUser.WhoAmI();

// CRMEmail proxy object

Microsoft.Crm.Platform.Proxy.CRMEmail email = new Microsoft.Crm.Platform.Proxy.CRMEmail();

email.Credentials = credentials;

email.Url = crmDir + "CRMEmail.srf";

// Set up the XML string for the activity

string strActivityXml = "";

strActivityXml += "";

strActivityXml += "") + "]]>";

strActivityXml += "";

strActivityXml += userId.ToString("B") + "";

strActivityXml += "";

// Set up the XML string for the activity parties

string strPartiesXml = "";

strPartiesXml += "";

strPartiesXml += "" + crmUser.GetEmailAddress() + "";

strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otSystemUser.ToString() + "";

strPartiesXml += ""+ crmUser.GetId().ToString("B") + "";

strPartiesXml += "";

strPartiesXml += Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_TO_RECIPIENT.ToString();

strPartiesXml += "";

strPartiesXml += "";

strPartiesXml += "";

strPartiesXml += "" + mailFrom + "";

if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otAccount) {

strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otAccount.ToString() + "";

}

else if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otContact) {

strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otContact.ToString() + "";

}

else if (objectType == Microsoft.Crm.Platform.Types.ObjectType.otLead) {

strPartiesXml += "" + Microsoft.Crm.Platform.Types.ObjectType.otLead.ToString() + "";

}

strPartiesXml += ""+ objectId.ToString("B") + "";

strPartiesXml += "";

strPartiesXml += Microsoft.Crm.Platform.Types.ACTIVITY_PARTY_TYPE.ACTIVITY_PARTY_SENDER.ToString();

strPartiesXml += "";

strPartiesXml += "";

strPartiesXml += "";

log.Debug(strPartiesXml);

// Create the e-mail object

Guid emailId = new Guid(email.Create(userAuth, strActivityXml, strPartiesXml));

return emailId;

}

catch (System.Web.Services.Protocols.SoapException e) {

log.Debug("ErrorMessage: " + e.Message + " " + e.Detail.OuterXml + " Source: " + e.Source);

}

catch (Exception e) {

log.Debug(e.Message + "
" + e.StackTrace);

}

return new Guid();

}

Now I would like to share the trick with you - there is no method to make this activity closed in MS CRM SDK 1.2 (if somebody knows the one - I owe you small pocket aquarium - smile!). Obviously Microsoft doesn't support if you do direct SQL programming bypassing SDK. However I would say this is not direct objects creation - this is rather flags correction. So here is what we have - this procedure will do the job and make activity closed:

public void UpdateActivityCodes(Guid emailId) {

try {

OleDbCommand command = conn.CreateCommand();

command.CommandText = "UPDATE ActivityBase SET DirectionCode = (?), StateCode = (?), PriorityCode = (?) WHERE ActivityId = (?)";

command.Prepare();

command.Parameters.Add(new OleDbParameter("DirectionCode", Microsoft.Crm.Platform.Types.EVENT_DIRECTION.ED_INCOMING));

command.Parameters.Add(new OleDbParameter("StateCode", Microsoft.Crm.Platform.Types.ACTIVITY_STATE.ACTS_CLOSED));

command.Parameters.Add(new OleDbParameter("PriorityCode", Microsoft.Crm.Platform.Types.PRIORITY_CODE.PC_MEDIUM));

command.Parameters.Add(new OleDbParameter("ActivityId", emailId));

log.Debug("Prepare to update activity code " + emailId.ToString("B") + " in ActivityBase");

command.ExecuteNonQuery();

}

catch(Exception e) {

log.Debug(e.Message + "
" + e.StackTrace);

}

}

Happy customizing! if you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

bout The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, California, Colorado, Texas, New York, Georgia and Florida, Canada, UK, Australia and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.


akarasev@albaspectrum.com

Microsoft CRM or Siebel

Siebel is traditional CRM market leader, however and mostly due to recession 200-2003, Siebel lost sizable portion of CRM market to new tiger, such as Microsoft CRM. Microsoft CRM s recent (2001) CRM answer from Microsoft and attempt top get market share from traditional vendors: Siebel, Oracle, Onyx. Now it is targeted to the whole spectrum of horizontal and vertical market clientele. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision (the last two in progress).

We would like to give you Microsoft CRM selection advise, based on our MS CRM consulting practice, going back to its inception in 1999. This article is written in FAQ style for beginner level

1. What is your industry – how strange it may look – close to 40% of our clients or so-called orphan clients – who needs help with Microsoft CRM customization are freight forwarding, transportation companies, who needs either improvement in Exchange-CRM connector or MS CRM integration with their freight forwarding system, where they would like to see on the fly resent shipment info. And also to mention freight forwarding companies are usually large (more than 50 CRM users)

2. How comfortable you are with Microsoft technology in-house support – The old-days idea of Apple computer was to make computer absolutely intuitive and working for housewife. Now we know that this is not realized so far. If you compare MS CRM with Siebel – you will see that MS CRM requires y0u to have Microsoft Certified people in staff. Everyone knows that Microsoft is “so innovative” that each product requires daily service packs and patches

3. Do you have Great Plains, Solomon or Navision – CRM is usually integrated with ERP system and if you are looking at MS CRM – you should benefit if you have ERP from Microsoft Business Solutions (Great Plains, Solomon, Navision, Axapta or Small Business Manager - SBM)

4. Operating System Philosophy - Microsoft likes clients who have no UNIX/LINUX/IBM/Apple etc inclination and staked on Microsoft Windows 2003/2000/XP/Longhorn, preferably staying on Intel platform (No AMD Athlon 64)

Have fun in selection and decision. We are here to help you: 1-866-528-0577

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, with offices in Chicago, Phoenix, Los Angeles. San Francisco, San Diego, New York, Atlanta, Denver, Miami, Toronto, Montreal, Madrid, Moscow (www.albaspectrum.com), he is Dexterity, SQL, C#.Net, Crystal Reports and Microsoft CRM SDK developer.


akarasev@albaspectrum.com


Microsoft CRM Modification – overview for IT specialist

Microsoft CRM is now on the scene and it is increasing its market share, due to the Microsoft Business Solutions muscles and marketing strategy. It is tightly integrated with other Microsoft Business Solutions products such as Microsoft Great Plains, Solomon, Navision.

If you are programmer or database administrator who is asked: how do we modify Microsoft CRM – read this article and you will have the clues for further research.

1. Microsoft CRM SDK – this is software development kit with C# and partly VB.net code samples – it is supported by Microsoft Business Solutions technical support. It is based on web service calls, if you are C# .NET developer – you are excellently positioned to do this type of customizations. This is the preferred modification scenario and this should be easily upgradeable customization. VB.Net examples will be available soon.

2. Legacy SQL Data integration. This is also easy and safe. If you have SQL database, sitting on the same or linked SQL Server – you can create ASPX .Net application and simply integrate it into CRM. You can place it on the navigation bar or menu in isv.config – please refer to MS CRM SDK

3. Legacy ASP integration – this is somewhat more sophisticated. You have to deploy HTTP handler to be a middle party between CRM which is .Net based and ASP which is legacy IIS. The trick is – you have to have INI file with security settings to penetrate into MS CRM with proper credentials, calling web service.

4. Microsoft Exchange Programming. Microsoft CRM has Exchange connector – which moves CRM incoming email to MS if it has GUID in its subject. You can alter this logic (for instance - move email to CRM if it doesn’t have GUID but it is from the sender who is contact or account in MS CRM). Refer to MS Exchange SDK onsyncsave event handling. Then simply apply some MS CRM SDK programming - you need some COM+ objects creation and VB programming experience.

5. Direct SQL touch – in #4 above I described you the scenario with MS Exchange handlers – this would be ideal world if MS CRM SDK does the job. But – in real world this is not always true – you have to do direct flags correction in CRM database (like making Activity closed, moving email attachments/octet streams, etc). This is not supported by MBS technical support – but you can rescue to this technique if you have to get job done.

6. MS CRM Customization tool – this is rather end-user tool and we don’t describe it here – read the manual. We’ve described above the options to use when this tool doesn’t do the job

7. Crystal Reports - feel free to create Crystal report - tables and views structure is self explanatory. Try to avoid the temptation to create your own SQL view or stored procedure in MS CRM database, instead - create custom database and place your view and stored proc in it.

Happy modifying! If you want us to do the job - give us a call 1-866-528-0577! help@albaspectrum.com

About The Author

Andrew Karasev is Chief Technology Officer in Alba Spectrum Technologies – USA nationwide Microsoft CRM, Microsoft Great Plains customization company, based in Chicago, Boston, San Francisco, Los Angeles, Houston, Atlanta, and Miami and having locations in multiple states and internationally (www.albaspectrum.com), he is Dexterity, SQL, VB/C#.Net, Crystal Reports and Microsoft CRM SDK developer.


akarasev@albaspectrum.com