Wednesday, January 09, 2008

Busy, busy + SDK

It has been some time since my last entry and it is mainly due to the fact that I am currently involved up to my ears in two large integration projects with Microsoft Dynamcis CRM 3. Very interesting and demanding but the problems we are facing are mostly project specific and not anything I believe you would find interesting and my customers probably wouldn't want me to talk to much about. When I run into something that I think will be of interest, and I have the time, I will of course let you know.

Personally, I havn't had much time to dig into CRM 4.0 yet but I noticed that the SDK has been released. You can find it here:

Happy coding!

Gustaf Westerlund
Microsoft Dynamics CRM Consultant

WM-Data/Logica CMG


  1. I've just downloaded the SDK myself, and am beginning to go through it.

    Specifically, I'm looking for how to add or remove links and menus to the CRM webpage. I want to remove some links left behind from a third-party CRM 3 add-in. I removed the items from the isv.config.xml file, but the links and menu items still appear, so I'm guessing the CRM upgrade program must have imported them into something else, and that the isv.config.xml isn't referred to now.

    Do you know how I would manage customizing the navbar and menus?


  2. Hi,
    No, I am sorry. I havn't had the time to look in to how this is managed, but since CRM 4.0 is multitennancy, the old way of handling customizations using isv.config.xml and callouts that consist of physical files, shouln't be used as they will (as far as I know) used for all tennants and the support for callouts, for instance is deprecated but working just to ensure compatibility of deployed extensions.

    I would start by looking at the different thing you can export from the customization export. I would presume the new isv.config functionality would work more or less like the old sitemap-customization, ie, export an xml, change it and import it.

    Perhaps there is some GUI for this but I would think that a bit unnecessary since most customizations of this kind are done by people who can read and write xml-files.

    Please add a comment when you have fixed it and I will publish it for you.


  3. (Informative note: These problems are occuring on a system I setup to test the CRM3 to CRM4 upgrade, on a system running CRM3, several c360 v3 products, and a couple of ISV add-ons my company developed. I intentionally upgraded CRM *without* removing the c360 and home-built add-ons to see what would happen.)


    Yes, I'd gone brain-dead and completely forgotten about using the Export tool from the GUI. Instead I was trying to just edit the isv.config.xml file directly.

    I was able to remove the bad links and menus by exporting the ISV.config and Site Map from 'Export Customizations', and then editing the .xml files and re-importing them.

    Problem solved.

    I've got one remaining problem - each time a Contact record window is closed, an error is generated. I don't know the underlying cause of the error, and don't understand the details very well either.

    When 'Contacts' is loaded, IE reports an error on the page:
    "XML Document must have a top level element.", at Line 0, Char 0, Code 0, with a URL of AdventureWorksCycle/_root/Blank.aspx.

    If you then open a Contact record, then when the contact record is closed an error is generated. This error is sent to MS, and the details indicate a syntax error on Line 90 of edit.aspx under conts, under sfa, under AdventureWorksCycle.

    I don't think I'm going to solve that one. This system is a test system anyway, and I think I'm going to have to just start over, recreating the test and uninstalling the c360 products before upgrading. My boss wanted me to do that this morning, and I've spent the entire day manually removing the c360 pieces and repairing the damage anyway.

    By the way, for any readers - If you also have a system that was running CRM3 AND c360 bits, and you then upgrade to CRM4 without removing the c360 components, then you'll find the CRM webpage will not respond to any mouseclicks. You can uninstall the various c360 components from Add/Remove, but some of the uininstalls will suffer errors, and you'll need to remove the c360 links and buttons (from CRM) yourself.

    -- Steve

  4. Hi,
    Nice to read that it worked for you.

    The other problem you mentioned I believe might be caused for two different reasons:
    1. There are javascripts on the onload/onsave of Contacts. Please veryify that these have been removed (Edit the entity form).
    2. I have no personal experience with the c360 bits but if the extensions are non-supported, that upgrades and patches are likely to get you into trouble. I certainly hope this isn't the case since that would seriously limit the use of the add-on.


  5. Hi Gustaf,
    you have correctly identified the issue with onload and onsave script. The reason being a major change in the way scripts are handled in CRM 3.0 and CRM 4.0. In 3.0 CRM injected the scripts directly into the aspx pages. whereas in 4.0 CRM maintains the script in external file.
    c360 products have a script engine that dynamically manages the scripts and c360 has correspondingly upgraded its script engine for CRM 4.0. So upgrading c360 products is also a fix to the problem.
    Alternatively, if you are comfortable with a bit of scripting there is also a workaround that can fix the issue without uninstalling or upgrading c360 products. all you need to do is reach the onload/onsave script you will see a script tag added by c360 product. the src of this tag points to a scriptengine.aspx page. copy this url and request for the same page in a different browser window. this will get you the complete script, copy the entire script and replace the script tag with this script, in the onload and onsave events. you will need to do this for account, contact and lead.


  6. I walked into an environment with c360 v1.2 components. The environment was upgraded to v3.0 and then v4.0.

    Every entity that had OnSave or OnLoad code would throw a “Syntax Error” error when ever the window was closed. We did not want to C360 customizations in our new environment so this was an easier fix than most.

    The Site Map entity had to be modified to remove links to C360 code. This was done via exporting the customization, edit and then import the changes.

    A query in the _MSCRM database identified the entities that needed to be fixed:
    Select FormXml
    From OrganizationUIBase
    Where FormXml like ‘%c360%’

    Then it was a matter of navigating to each entity and deleting the customizations from the OnSave and OnLoad events

  7. Thanks Greg for your usefull comment!