• News & Events

    Keep up with the latest and greatest news, events and knowledge from the Magnetism team.

Gayan Perera Blog





  • 07 Mar

    Large CRM 4 to CRM 2011 Upgrade – Too many workflows…


    We’re currently in the process of upgrading a large Dynamics CRM 4 to CRM 2011. CRM 4 was implemented by another vendor and has over 80 workflows! Some of which are very complex with custom workflow activities.

    We wanted to quickly get a list of all the workflows that had custom activities without going through each one manually.

    Large CRM 4 to CRM 2011 Upgrade

    To get a list of workflows with custom activities do the following

    1. Go into the SQL server

    2. Open SQL Management Studio

    3. Run the query below against your *_MSCRM database

    SELECT name, xaml 
        FROM Workflow
    WHERE Xaml...

    Read full post
  • 07 Feb

    CRM 4 Upgrade to CRM 2011 - Blank Type Name in Plugin Registration Tool


    We noticed that after an upgrade of CRM 4 to CRM 2011 the plugin registration tool will sometimes show (Plugin) instead of the actual plugin type name.

    CRM 4 Upgrade to CRM 2011 - Blank Type Name in Plugin Registration Tool 

    The reason is because of the PluginTypeBase table the Name field is blank. Here’s an unsupported way of copying back the TypeName to the Name field.

    1. Go into the SQL Server

    2. Open up SQL Management Studio

    3. Run the query below on your *_MSCRM database

    UPDATE PluginTypeBase 
        SET Name = TypeName
    WHERE Name IS NULL

    Read full post
  • 07 Jan

    Code Generating Code…programmatically retrieve N:N relationships


    We recently needed to write a plugin that associated multiple different record types with a custom entity. The custom entity contained over 30 system many to many relationships with the other record types.

    We could’ve taken a couple of different approaches. One would’ve been to dynamically retrieve the relationship when the plugin ran, this means an extra call to the CRM service. The other option was to have a static dictionary mapping inside the plugin code.

    We chose the 2nd option because the relationships would not change and there is no need to make an additional call to the ...

    Read full post