Developing Callouts
When developing callouts, many of you have probably gone mad by all the waiting due to the fact that the IIS has to be stoped and started between every compilation, and then most of the CRM application has to be recompiled again when you try to access the page. I have tried to find a good solution on how to bypass this, some including trying to shut down the AppPool instead of the IIS, but I couldn’t get it to work.

This evening, I read a blog about how you can do it! This great guy has developed a small program that just calls your callout like the CRM normally does, only you can do it in your local computer instead! Great for debugging! A simple a ingeniuos solution, why didn’t I think of that?

You can find it at: http://www.stunnware.com/crm2/topic.aspx?id=LocalCalloutDebugging

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

On taking backup
When taking backup of your CRM system, to avoid any later problems consider the following:
– Take a complete backup of the xxxx_MSCRM database.
– Take a complete backup of the xxxx_METABASE.
– And just to be sure, export all customizations to an xml-file.
– Make a backup of the Microsoft CRMServerbinassembly (normally found in Program Files)
– Make a backup of all custom aspx and html pages and code from the external website.

If you have any customizations what so ever, make sure you take a backup of the METABASE att same time as the MSCRM-database. If you do not, you might encounter inconsistencies at a later date which might be hard to fix. I’m planning on writing about what you do if this happens anyway.

If you have made any changes to the reports you should also backup the main SQL Reporting Services database, but hopefully have the rdl:s somewhere else aswell.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

MS Hotfixes

Maybe you’ve already been there, if not, you should, The Microsoft hotfixes for MS CRM 3.0 can be found here. Note that it is provided as-is, so read the text above the files before downloading anything!

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

Limitations on Client side dublett handling

In the CRM SDK there is an example of how to create a dublett checker. It works fine but I would like to point out a few things.

  1. Note that it is based on JavaScript, hence it will only be used when the GUI is run. When running an import, for instance, the GUI is not used and the javascript will not be run.
  2. Perhaps a lead dubletthandler should also check for the existance of an account with the same name. It is only natural to check if the new lead might already be a customer.
  3. It cannot be used offline. Users should be notfiied of this or the function to create the entity should be disabled in offline mode.

To solve the first problem, the best cause of action is to make a callout-based dublett handler in addition to the javascript based. You don’t want to throw that away since its user interface is a lot better than the callout-based checker.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se

What is the REAL error?

Finding what the real error is can sometimes be a bit tricky since the real error actually is embedded a bit down the exception hierachy. For instance, I recieved the following error when trying to send an email with the normal .NET mail classes using a workflow-dll.

Error code=8004280b. Unable to access the object CDO.Message.

I started thinking that there might be some different version between my local .NET and the server on where the program was run. I also thought there might be some problem with finding/accessing the dll. A bit weird but it had to be something.

However, after searching the internet I found that this error might not actually be the real error. Try recursing down into the exceptions to find the real error, and I did. With the following code:

try {
SmtpMail.Send(mail);
}
catch(Exception ex )
{
OutText(“The following exception occurred: ” + ex.ToString() ); //check the InnerException while( ex.InnerException != null )
{
OutText(“——————————–“);
OutText(“The following InnerException reported: ” + ex.InnerException.ToString() ); ex = ex.InnerException;
}
}

The output made me solve the problem in 5 sec, I had forgot to assign a to-adress in the mail. A weird error message for a simple and stupid error. So, from now on, I am always a bit sceptical on what error is shown and if it is the real error or not.

Gustaf Westerlund
CRM and SharePoint Consultant

Humandata AB
www.humandata.se