Tuesday, April 22, 2008

Upgrading callouts to CRM 4.0

Hi again,
Busy as ever, I am still working on this large CRM project with lots of integrations. Very complex and very interesting.

At the moment we running CRM 3.0 but we are currently looking at upgrading to CRM 4.0 since we need to implement a new datamodell containing more than 40 very tighly connected entities with multiple relationships, self referentail relationships and much more! We are very lucky to be working with CRM 4.0.

The first part of the upgrade we are doing will be to just get everyting working in CRM 4.0 with as little or no code review as possible. We will lift all the code later (i.e. converting callouts to plug-ins, using the new web service and so on) when we have got everything running.

In other words, I first of all needed to get callouts from CRM 3.0 to work properly in CRM 4.0. After the "sleep-inducing-upgrade", I found that they simply didn't work. As I had made a few callouts that generated custom accountnumbers and other similar tasks, it became clear that it crashed because of the callouts.

I activated CRM tracing (http://support.microsoft.com/kb/907490/en-us) and soon found that the reason for the callouts not working was that CRM could not find the dll containing callout.base. So, I added the dll (Microsoft.Crm.Platform.Callout.Base.dll, found on the CRM 3.0 CD 1) to the GAC (C:\windows\assembly) and then ran iisreset.

After this, the callouts worked just like they should!

On the same topic, if you have a custom virtual directory bellow the CRM website, just add the file: C:\Program Files\Microsoft CRM\CRMWeb\bin\Microsoft.Crm.WebServices.dll to the GAC aswell, since it won't work otherwise. There are other ways of getting around this problem aswell, but I prefer this solution.

On the first of may I will be on parental leave for 4 months, so that I can really get to know my daughter without my wife getting in the way! ;)

Hopefully I will have time to write a bit on this blog aswell.

Gustaf Westerlund
Microsoft Dynamics CRM Architect

Logica Sweden
www.logica.com

p.s.
If you havn't tried Bio Shock on XBOX 360, you really should!

4 comments:

  1. My name is Wanda Black. I am the Assoc. Director of Information Engineering at Martek Biosciences.

    We are in the process of implementing CRM 4.0. In doing so, we need to interface with a backend system called ACCPAC - our accounting system. Do you know of an interface already available for 3rd parties or specifically for ACCPAC? If so, could you share.

    Thanks. Wanda

    ReplyDelete
  2. Hi Wanda,
    No, I am not aware of any existing point-to-point integration between Microsoft CRM 3/4 and ACCPAC. I am alos not familiar with this system.

    Have you definied what entities and fields you desire integration of and if it is a simple on-way integration (pushing data from one system to the other) or a more complex two-way with syncronization. Microsoft CRM 3/4 has full support for creating these kinds of integrations either directly using the API or using the BizTalk adapter.

    If you would like to consult with me further, please send me you email adress in a comment (I won't publish it) and we can discuss it further.

    Gustaf

    ReplyDelete
  3. I tried to add the Microsoft.Crm.WebServices.dll to the GAC but was unsuccessful because the dll did not have a strong name. How did you get it to register?

    Thanks for any help you may give.

    ReplyDelete
  4. Hi Josh,
    I tried this again and I have no problems adding it to the GAC. I just drag-n-drop the dll to the assembly directory. Please note that this directory is a bit odd and needs to be handled specially why not all normal ways of copying files here will work. Drag-n-drop works fine for a file like this and if you want to script anything you can use gacutil.exe.

    As far as I can see it does have a strongname:
    Name: Microsoft.Crm.WebServices"
    PRocesor Architecture: x86
    Culture: Neutral
    Version: 4.0.0.0
    Public Key Token: 31bf3856ad364e35

    As you probably know, the public key token won't be available if it isn't strongnamed.

    You can also remove the dll from the web.config or deploy it to the ISV directory as described in the SDK (and placing the dll in the CRMWeb\bin directory.

    Good luck!

    ReplyDelete