Profilo di AaronAaron Elder's Web LogBlogElenchi Strumenti Guida

Blog


15 marzo

My CRM Blog is moving...

Hey everyone...
 
We just released our new corporate website and as part of this effort added a blog!  Going forward, I will be making all of my Microsoft CRM related posts on this new site.  For all of you with RSS feeds to this site, you may want to update your feed to point to this new site's RSS feed.
 
I will continue to post random development items and non-corporate or CRM things here... but for all my readers interested in Microsoft CRM, I encourage you to update your links.
 
 
Cheers
16 febbraio

Microsoft Dynamics CRM 3.0 Virtual PC Demonstration

If anybody out there is using the Microsoft Dynamics CRM 3.0 Virtual PC Demonstration that is available here:
 
 
You should be aware of a few minor issues with this image.
 
Issue #1 - Its a bit bloated
Typically, sales people will use this image to demo Microsoft CRM and all its wonderful features.  Unfortunately, most sales peoples don't have laptops with 2GB+ of RAM.  This image, as currently configured, requires at least 1GB of RAM allocated to it to run.  This is because this image has SharePoint, Exchange, Microsoft CRM, SQL Server 2005, SRS and the Outlook Client on it.  In addition, it has a few things on it that really aren't needed in a "demo" environment.  Here is a quick list: 
  • Virus Scanner (taking this off makes the disk access much faster and frees up almost 30MBs of RAM)
  • Distributed File System Service (5MBs of RAM)
  • File Replication Services (1.3MBs of RAM)
  • SQL 2005 OLAP Services (22MBs of RAM)
  • SharePoint (58MBs of RAM) - Unless you need to demo it
  • A bunch of other random Windows Services (5MBs of RAM)
All told, turning off a lot of this stuff can free up an quick 120MBs of RAM that can really make a difference on a slow laptop.
 
 
Issue #2 - Odd installation locations
 
Typically CRM is installed here:
C:\Program Files\Microsoft CRM
 
But on this image it is installed here:
C:\Program Files\Microsoft CRM Client
 
Which makes for the really confusing location of the CrmWeb folder here:
C:\Program Files\Microsoft CRM Client\Microsoft CRM Server\CRMWeb
Note the "server" files under the "Client" folder... adding to this confusion... there is also an invalid CrmWeb folder here:  C:\Program Files\Microsoft CRM\CRMWeb
 
 
Issue #3 - MSXMLSQL.DLL is not installed correctly
 
Building on Issue #2, SQL Server seems to be installed in two locations.
C:\Program Files\Microsoft SQL Server
and
C:\Program Files\Microsoft CRM Client\Microsoft SQL Server
 
The problem is that the MSXMLSQL.DLL is not installed in the location that SQL Server expects.  This means that if you write code that makes use of this DLL and uses SQL XML, you will get the error:  "Failed to load MSXMLSQL.DLL".  Fortunately, the files are on the image... they are just in the wrong place.  The following script will fix this issue:
 

copy "c:\Program Files\Microsoft SQL Server\90\Shared\msxmlsql.dll" "c:\Program Files\Microsoft CRM Client\Microsoft SQL Server\90\Shared"

 

copy "c:\Program Files\Microsoft SQL Server\90\Shared\Resources\1033\msxmlsql.rll" "c:\Program Files\Microsoft CRM Client\Microsoft SQL Server\90\Shared\Resources\1033"

 

Updated (02.17.2006)

Issue #4 - SharePoint has not been updated.

This image has both SharePoint Services (WSS) and SharePoint Portal Server 2003.  Both are running the original RTM bits.  If you plan to demo / use SharePoint on this image, I recommend you move to SP2.  Which is available here:

WSS: http://www.microsoft.com/downloads/details.aspx?FamilyID=b922b28d-806a-427b-a4c5-ab0f1aa0f7f9&DisplayLang=en

SPS: http://www.microsoft.com/downloads/details.aspx?FamilyID=171dc9a7-b4ba-4759-bd64-6b7d851a97ef&DisplayLang=en

 

 

Overall this is an excellent tool that Microsoft has provided the partner community.

 

Cheers,

14 febbraio

You ever get this error?

I get this error all the time in Microsoft CRM 3.0 when loading an entity from the Settings | Customization | Customize Entities page:
 

"Error: An error has occurred. For more information, contact your system administrator."

 
If you turn on "Dev Errors" you see the following additional details:
 
Microsoft CRM Unhandled Error Details:

Server Error in '/' Application.

Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

 

The error seems to be some form of timing issue.  If you wait for the "Customize Entities" page to fully load and then give it a second... the Entity Editor loads perfectly every time.  If however, you try to load an entity before the page is 100% done loading, you will get this error.  A quick look into the cause, shows that the URL that loads is different depending on whether or not you wait for the page to finish:

 

URL if you don't wait - This gives an error
http://crm/userdefined/edit.aspx?id=custom:{b5f1e023-4be4-48ba-a424-94f17e4be732}&etc=10003

 

URL if you wait - This one works
http://crm/Tools/SystemCustomization/Entities/manageEntity.aspx?entityId={b5f1e023-4be4-48ba-a424-94f17e4be732}

 

The work around is simple: Wait for the "Customize Entities" page to load and try loading the "Entity Editor" again.

 

 

Upgrading Supported Microsoft CRM 1.2 Environments to Microsoft CRM 3.0

"This white paper reviews the key components for you to prepare in your environment for a successful upgrade from Microsoft CRM 1.2 to Microsoft CRM 3.0. This white paper is a supplement to the Microsoft CRM Implementation Guide."
 
 
This is definately a good read.
06 febbraio

CRM 3.0 - Closing a Task generates an error

We ran into this problem on our production CRM system.  I haven't seen a Microsoft KB article on it yet, so I hope this helps anybody else that comes across this problem.

 

NOTE: This article is provided "AS IS" with no warranties expressed or implied

 

Summary

On systems that have been upgraded from Microsoft CRM v1.2 to v3.0, users may receive the following error when attempting to close a task.
Error Details
Crm Internal Exception: Picklists with more than one childAttribute are not supported.
0x80040250
Resolution

The reason for this is that in Microsoft CRM v1.2 the Activity Task Entity has a 'Direction' field on in.  This is used on most entities to say if the task is tracking an incoming or outgoing item.  While this makes sense for e-mails, letters and phone calls... it does not make sense for Tasks.  For this reason, this field has been dropped from the Microsoft CRM 3.0 Task Entity.  During the upgrade, CRM considers this field to be 'custom' (because it is not in the new schema) and as such creates the attribute CFSDirectionCode on the Task entity.

To fix this problem, follow these steps:

  • Verify that no Task activities make use of this field and backup your data as require
  • Load CRM
  • Go: Settings | Customization | Customize Entities | Task
  • Go to the 'Attributes' area and 'Delete' the field CFSDirectionCode
  • Publish the entity

Note: Be sure you are deleting the correct attribute on the correct entity.  This operation results in data loss and cannot be undone.  Generally speaking, this field should always be empty for all Task records in the system and therefore no actual data will be lost.

05 febbraio

Updated Microsoft CRM 3.0 SDK Released (3.0.3)

The Microsoft UE team has released another update to the Microsoft CRM 3.0 SDK.  This is version 3.0.3 and has a release date of February 1st, 2006!
 
The new SDK is available here:
 
 
Here are the release notes:
 

Version 3.0.3, January 2006 Callouts Added information about how to retrieve all attributes in a callout. Added note about callouts for system generated activities such as an OrderClose activity.
  AssignRequest Entity instances cannot be assigned to teams. Removed erroneous documentation.
  TimeBlock Clarifed information about changing styles for a TimeBlock.
    Fixed broken links throughout SDK.
  Class and Method Mapping

Quote Detail

Sales Order Detail

Opportunity Product

Changed RetrieveQuantity references to GetQuantityDecimal.
  InstantiateTemplate

SendEmail

Added reference sample code to messages.
  Download an Attachment Added sample code to demonstrate how to download an attachment programmatically.
  CRUD Operations Using Dynamic Entities Added sample code to demonstrate basic create, update, retrieve and delete operations using dynamic entity.
  Download an Attachment Added sample code to demonstrate how to download an attachment.
  Retrieve the Localized State Name Added sample code to demonstrate how to retrieve the localized state name
  Route an Incident from a User to a Queue Added sample code to demonstrate how to route an incident from a user to a queue.

Added a note to the Assign message regarding the use of the Route message for changing the ownership of an incident.

  Support and Certification Added a topic on Support for .NET Framework Versions.

Additions to Unsupported Customizations.

  Client Side Scripting Bug fix in sample code for the OnSave method.

Updated sample code for the Lookup field type.

  Execute Method Reorganized this topic for greater clarity.
  Helper Code for CRM Types Added missing examples and documentation for the CRM types helper code.
25 gennaio

CRM SDK Bug - How to upload files into CRM 3.0

The current CRM 3.0.1 SDK has several samples that explain how to make use of the following messages: 
  • UploadFromBase64DataAnnotationRequest
  • UploadFromBase64DataActivityMimeAttachmentRequest
  • UploadFromBase64DataSalesLiteratureItemRequest
 And they all provide samples that look something like this:
 
string data;// Variable declared outside of using statement

// Create an instance of StreamReader to write text to a file.
// The using statement also closes the StreamReader.
using (StreamReader sr = new StreamReader("temp.txt"))
{
   // Read in the file's contents
   TextReader reader = sr;
   data = reader.ReadToEnd();
}

// Encode the data using base64
byte[] byteData = new byte[data.Length];
byteData = System.Text.Encoding.UTF8.GetBytes(data);
string encodedData = System.Convert.ToBase64String(byteData);

// Create the Request Object
UploadFromBase64DataAnnotationRequest upload = new UploadFromBase64DataAnnotationRequest();

// Set the Request Object's Properties
upload.AnnotationId = annotationId;
upload.FileName = "temp.txt";
upload.MimeType = "text/plain";
upload.Base64Data = encodedData;

// Execute the Request
UploadFromBase64DataAnnotationResponse uploaded = (UploadFromBase64DataAnnotationResponse) service.Execute(upload);
 
 
Unfortunately, there is a bug in this code (highlighted in RED).  The problem is that if you try to upload binary data the method by which the data is read from the file system and encode is in adequate.  Using the above code will result in files that only contain a portion of the binary file that intended to attach.  I am partly to blame for this (as I helped write this sample) and the above sample works great if you are uploading plain text (as our unit tests proved ).  However, if you want to upload binary data... you will need to do two things.  First you need to be sure to set the MimeType properly (this should be obvious and is not a bug in the sample).  Second you need to use the following code to read-in and encode the binary data:
 
// Get a pointer to the file and open up a stream
FileInfo pointer = new FileInfo(file);
FileStream fileStream = pointer.OpenRead();
 
// Encode the data using base64
byte[] byteData = new byte[(int)fileStream.Length];
fileStream.Read(byteData, 0, (int)fileStream.Length);
string encodedData = System.Convert.ToBase64String(byteData);
 
// Close the stream
fileStream.Close();
 
Basically, this approach to loading the into the Byte Array actually works for binary data (thanks MSDN).  Now that we have all encodedData loaded correctly, the rest of the code works as expected.
 
Cheers,
 
16 gennaio

Debugging CRM and "Break into the debugger"

One of my favor features in the Microsoft Visual Studio debugger is the ability to have it "break into the debugger" when any exception occurs.  I find this feature to be a great way to quickly identify where an exception occurring in my code without having to set break points and step through it.  I can just say "break whenever you find an exception".  I then run my code as normal, when the exception occurs, VS will stop execution of the process and break into the source code where the problem occurs.  I can then go about my normal business of debugging. 
 
You can read about this feature here:
 
Now, it is all fine and good that I like this feature, but why is this important when debugging code that calls the Microsoft CRM 3.0 platform?  The answer is that CRM 3.0's web services have a nasty habit of throwing an exception almost every time they are called.  Here it is:

 

Image:


Text:

A first chance exception of type 'System.ObjectDisposedException' occurred in system.dll
Additional information: Cannot access a disposed object named "System.Net.Sockets.NetworkStream".
 
 
 
As a developer working on the Microsoft CRM application team, we simply got use to it and got into the habit of simply hitting "continue" (instead of break) whenever the platform threw this "bogus" exception.  I know the platform team did some research (and I am fuzzy on the details) but it turns out that this is actually a problem with the .NET Framework and the team made the call to not try to fix/workaround the issue (given the risk, the scope of the fix, the ship date, etc.) As a note, I completely trust that decision and you should too .
 
 
Anyway, I am posting this today so that people know about this exception and know that it is safe to ignore when it comes from a CRM 3.0 web service call.  Hopefully some developer that has run into this problem, will do a quick Google (or MSN) search, find this posting and save him/her self a good many hours chasing down a bogus exception.
 
Cheers,
08 gennaio

More - Localized versions of CRM 3.0 on MSDN

More Russian and Dutch versions are available on the MSDN subscriber download page.
 
 
01 gennaio

Microsoft releases localized version of CRM 3.0

Happy new year everyone! 
 
A small bit of news... the Spanish, Italian, Danish and Portuguese versions of Microsoft Dynamics CRM 3.0 SBE are now available for MSDN subscribers.
 
 
28 dicembre

Microsoft CRM v1.2 - Hot Fix Update Rollup #2

Update Rollup 2 for Microsoft CRM 1.2 (KB904435)

Brief Description
"Update Rollup 2 is a tested, cumulative set of updates for Microsoft CRM Server 1.2, Microsoft CRM Sales for Outlook 1.2, and Microsoft CRM-Exchange E-mail Router 1.2, including performance enhancements, that are packaged together for easy deployment."

http://www.microsoft.com/downloads/details.aspx?FamilyID=172861ae-d02e-4441-b432-26e88dd0ab14&DisplayLang=en

 

It is pretty safe to assume that this will be the last rollup for CRM v1.2 for a while and I would generally recommend it for all existing CRM v1.2 installs.

 

You can read about all the fixes in this release here:

http://support.microsoft.com/default.aspx?kbid=904435

 

Microsoft Dynamics CRM 3.0 Virtual PC Demo

Microsoft has put together a nice VPC with the good old "Adventure Works Cycle" demo on it!
 
Check it out:
 
It is pretty big and you need to have Microsoft Virtual PC 2004 installed to use it.  Here are the details:
 
"Microsoft Dynamics CRM 3.0 release Virtual PC Demonstration. This demo is a one computer setup with Microsoft CRM 3.0 server and Microsoft CRM 3.0 client for Outlook. This demonstartion also contains Microsoft Exchange Server 2003, Microsoft SQL Server 2005, and Microsoft Visual Studio 2005."
 
Posted: 12.19.2005
Size: About 3.8GB Compressed
 
14 dicembre

Microsoft CRM 3.0 and IE7

This is sort of a non-event... but I think it is pretty cool that Microsoft CRM 3.0 seems to work perfectly under Internet Explorer 7.0 Beta 1 (7.5112.0).  I know the team did a bit of testing for IE7 compatibility during the final months before shipping and it appears that this worked paid off.
 
There are no guarantees that CRM 3 will continue to work with IE7 as the IE7 code base is ever changing... but the good news is that the CRM SE Team has a head start on compatibility and I would bet future fix requirements will be relatively minor.  If I had to take a guess, I would expect some form of Service Pack or Roll-up late next year to fix any issues that IE7 causes.

 


 

04 dicembre

Microsoft CRM 3.0 Pricing and Licensing

Microsoft has released a "Web Seminar" for partners that describes the licensing and pricing of Microsoft CRM 3.0.  This information is publicly available to anybody who registers:
 
Microsoft CRM 3.0 Pricing and Licensing Update - Sales Series 1 of 3

http://www.msreadiness.com/wscart.asp?eid=3457

 

Estimated Retail Pricing (US Only):

These prices are estimates only and vary based on your MSFT licensing program, geography, Software Assurance terms and other factors. You can get exact pricing through a CRM partner like Invoke Systems.

CRM 3.0 SKU Per Server Per User
Professional Edition $1,244 - $1,761 $622 - $880
External Connector $8,830 - $12,500 N/A
Small Business Edition $528 - $599 $440 - $499
Small Business Edition to Professional Upgrade $804 - $1,162 $182 - $381

02 dicembre

Microsoft CRM 3.0 SDK RTM Build Released

The "RTM" version of the SDK is now up on MSDN.  This of course is not the "final" release, as they will be updating this SDK as new content is added and improvements are made.  Here it is:
 
 
 
Kudos to the CRM SDK Team for getting this out! 
30 novembre

Microsoft CRM 3.0 - Release History

RTM- Released November 2005
Build: 3.0.5300.0
Summary: The final product.  Also known as "RC3" or "'RTM".

 

EAP - Released October 2005
Build: 3.0.5295.0
Summary: Provide to "Early Access Program" users.  Also known as "RC2".
Note: This is the only build that can be upgraded to RTM (Via uninstall / re-install and connect to existing DB)

 

RC1 - Not released to public
Build: 3.0.5289.0
Summary: Internal build never released to the public

 

TAP3 - Released August 2005
Build: 3.0.5236.2
Summary: A refresh to TAP users.  Also known as "Visual Freeze / WSDL Freeze".

 

TAP2 - Released June 2005
Build: 3.0.5166.4
Summary: A refresh to TAP users.  Also referred to as "Beta 1".

 

TAP1 - Released February/March 2005
Build: 3.0.5130.12
Summary: The first drop to TAP users.  Also referred to as "Alpha 1".

 

 

13 novembre

New CRM 3.0 SDK Available

The Microsoft CRM 3.0 SDK has been updated (11.08.2005) and you can get it here:
 
 
Many of you may not know, but the SDK will no longer ship "in the box" when Microsoft CRM 3.0 is finally released.  Since the SDK is ever improving and the team did not want to hold up shipping the actuall application bits because of any last minute SDK changes, the team decided to ship the SDK only online via MSDN.
 
The SDK includes:
 
The Microsoft CRM 3.0 SDK is for developers, system customizers and report writers. It contains the following sections:

  • Server Programming Guide – A guide for developers writing server side code, custom business logic, integration modules, workflow assemblies and more. This guide provides an architectural overview of Microsoft CRM, the entity model, security model, Web services, and lots of sample code .

  • Client Programming Guide – A guide for developers customizing the Web client or the Microsoft CRM client for Outlook, including scripting, integration of custom Web pages, and sample code.

  • Report Writers Guide - A guide for developers writing reports for Microsoft CRM using Microsoft SQL Server Reporting Services Report Designer.
  • 06 giugno

    Microsoft CRM v1.2 Database Purge Script

    The time may come when you want to "purge" your CRM database.  Generally, you would want to do this on a test environment that you use repeatedly (like when you are testing a data migration) or perhaps in a client environment after you entered a bunch of test data prior to "going live".  When this happens, you have several options.  First, you can restore a previous database, second, you can reinstall CRM, third, you can try to use CRM to delete all the records (not always possible and certainly time consuming).  The fourth option of course, is to run the handy SQL script below. 

     

    Before we get to the script, we have to get the formalities out of the way:

    This script is provided "AS IS" with no warranties expressed or implied and no rights conferred.  By downloading and executing this script you agree to do so "at your own risk", you also understand that the use of this script is completely unsupported by Microsoft Corporation and Invoke Systems.  A final bit of caution, this script was original intended for test and demo environments; it is NOT recommended for production servers.

     

    Now that we have that out of the way, let us move on to the script.  The "magic" of this script is knowing what to do delete, what not to delete and the order in which to perform the delete.  Generally speaking, we stayed away from anything "security related" (Business Units, Users, Roles and Teams), this is for safety and to prevent the 1001 bugs that would probably occur from such a brute-force assault on the CRM security model.  (Perhaps a future script will dare to venture down that path)  Additionally, this script avoids most "system level objects" including Templates and Views.

    --
    -- WARNING:
    -- This script is provided "AS IS" with no warranties expressed or implied
    -- and no rights conferred. By executing this script you agree to do so
    -- "at your own risk", you also understand that the use of this script is
    -- completely unsupported by Microsoft Corporation.
    --
    --
    -- NOTE: Run this script via Query Analyzer, be sure to run it
    -- against your "MSCRM Database"
    --
    --


    -- Remove References to allow future deletes
    UPDATE SalesOrderBase SET QuoteId = null
    UPDATE AccountBase SET PrimaryContactId = null
    UPDATE AccountBase SET ParentAccountId = null


    -- Remove Notes
    DELETE FROM AnnotationBase

    -- Remove Service Related Items
    DELETE FROM ContractDetailBase
    DELETE FROM ContractBase
    DELETE FROM IncidentBase

    -- Remove Sales Items
    DELETE FROM InvoiceDetailBase
    DELETE FROM InvoiceBase
    DELETE FROM QuoteDetailBase
    DELETE FROM QuoteBase
    DELETE FROM SalesOrderDetailBase
    DELETE FROM SalesOrderBase
    DELETE FROM CompetitorAddressBase
    DELETE FROM CompetitorProduct
    DELETE FROM CompetitorBase
    DELETE FROM OpportunityProductBase
    DELETE FROM OpportunityBase
    DELETE FROM SalesLiteratureBase

    -- Clean up the Product Catalog
    DELETE FROM ProductPriceLevelBase
    DELETE FROM ProductBase
    DELETE FROM UoMBase
    DELETE FROM UoMScheduleBase
    -- TODO: Discounts

    -- Remove Core Objects
    DELETE FROM ActivityPartyBase
    DELETE FROM ActivityMimeAttachment
    DELETE FROM ActivityBase
    DELETE FROM CustomerAddressBase
    DELETE FROM ContactBase
    DELETE FROM AccountBase
    DELETE FROM LeadAddressBase
    DELETE FROM LeadBase

    -- Remove Other Items
    DELETE FROM QueueItemBase

    -- Do not delete "User" private and WIP queues, as this will mess up
    -- routable objects (Cases & Activities)
    DELETE FROM QueueBase where QueueTypeCode <> 2 and QueueTypeCode <> 3
    DELETE FROM KbArticleBase
    DELETE FROM SubjectBase

     

     



     

    01 maggio

    Troubleshooting Microsoft CRM Callouts

      Oohhh, the joy of developing Microsoft CRM post callouts.  The truth is, developing these little gems can be rather trying.  They are rather both quirky and fragile in nature and if you ever spend a few minutes on the CRM newsgroups, you will see that many people have trouble getting them to work.  (You may read more about how hard callouts are to write in Michaeljon Miller's blog, the URL is below)

    With this entry I hope to provide you with the 16 things that I have seen cause callout failures, links to places where you can get additional help on callouts and a handy "Troubleshooting Workflow", which will walk you through the steps of isolating what and where you callout trouble may be.

    16 things you may be doing wrong (in no particular order):

    • The user trying to create the COM+ component does not have READ and EXECUTE access to the callout DLL or its dependent DLLs.

    • COM+ Registration Related:

      • Your callout class does not descend from ServiceComponent.

      • Your callout is not strongly named.  Service Components must be strongly named.  You must compile your component using a strong name key. 


    • CRM Registration Related:

      • Events for the entity must be enabled - Metabase.Entity.EventMask must be set to 1.

      • The GUID in the EntityEventSubscriber table does not exactly match the GUID of your component.

      • You have duplicate GUIDs.  GUIDs are intended to be unique, since may people copy and paste sample callout code as a template; it is very common to forget to change your classes GUID.

      • You did not configure your callout to listen to the event in question.  To fix this, be sure there is an entry in the EntityEventSubscriber table for each event type in which you are interested.  The event codes are:
        • 2 - Create
        • 8 - Update
        • 32 - Delete

           
    • You did not implement the ICRMCallout Interface or you implemented it incorrectly.

      • The GUID of the ICRMCallout is fixed, you need to make sure this GUID is set exactly to:  F4233E5B-17DC-4661-9ABC-6707A9F99215

      • You should define the interface inside the same namespace in which you wish to use it.

    • Problems at runtime:

    • Your callout is not firing for non-admin users.  Check the event log, the user trying to start the component may not have permissions to do so.  Check the "Identity" under which the component should run.

    • Callouts do not fire when the administrator is not logged into the server.  This is probably because you have the components "identity" set to "Interactive User" (which means the user currently logged into the machine).  Configure the component to have an identity of "This User" and set the user to a known and privileged CRM user.

    • You are trying to update the record that fired the update or create event in the first place.  If you must do this be aware of the following things:

      • For some record types, SQL server maintains a lock on the entities table while the callout is firing.  This means that you cannot update the record synchronously.

      • It is bad practice to make use of threading inside of your callout.

      • To work around these problems, it is generally best practice to write events to a Microsoft Message Queue (MSMQ) and later have a service retrieve and process these messages.  This allows your callouts to return quickly and perform the update asynchronously later on.

      • Be very aware of update loops!  For example, if your callout listens to the update event of an Account, and your code updates a field on that account, another update event will fire!  Your code must be "smart" enough to know which update events were triggered by your code and which were not.  Otherwise you will end up in a loop of updates that trigger updates which trigger updates (etc.)

    • Use the debugger!  If you are attempting to troubleshoot your callout DLL, be user to make use of the debugger!  If you are unable to install Visual Studio in the environment, use the GUI Debugger that ships free in the .NET Framework SDK.

     

    Troubleshooting Workflow:

    The following diagram attempts to walk you through the process of troubleshooting your callout.  The workflow works by the process of elimination.  If you can rule out what isn't the problem, the root of your problem generally becomes obvious.



    Click the image above for a readable version

     

    Helpful URLs:

    Michaeljon Miller's - Callouts are just plain hard to write
    http://blogs.msdn.com/mikemill/archive/2004/12/09/279021.aspx


    Business Logic Extensions to Microsoft CRM 1.2: Post-Callouts
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnmbscrm1_2/html/mbs_crmpostcalloutsv1d2.asp


    Microsoft CRM SDK - Post-Callouts
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CrmSdk1_2/htm/v1d2postcallouts.asp


    Microsoft CRM SDK - Registering your callouts:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/CrmSdk1_2/htm/v1d21addingyourcalloutstothemicrosoftcrmdatabase.asp


    Microsoft KB Article 891979 - CRM Update Callouts do not fire for Assign Events
    http://support.microsoft.com/default.aspx?scid=kb;en-us;891979